Board index » delphi » Briefcase Model

Briefcase Model

AutoIncremental fields could end up being broken when using the
Briefcase model. I had scenarios where it started renumbering even
though there were entries in the table, disconnected, worked locally and
the updated the server. What is the work around.
Access 2000, Delphi 5 Enterprise, ADO, Windows 98

In article <XNIehHA1F7G4E...@win-pro.demon.co.uk>, Arnold Johnson
<Arno...@win-pro.demon.co.uk> writes

Quote
>Question:
>Scenario : Access 2000 , MS Jet OLEDB 4.0 for simplicity sake.

>A mini application has 2 tables master/detail and the master table has
>amongst its columns an Auto-Incremental field. If all processes are done
>on the server one assumes the auto increment is updated accordingly.
>If the server is disconnected, e.g. local files are used, and new master
>rows are inserted 1) would the Auto-incremental fields continue to
>function?
>2) what would happen if a connection to the server is re-established
>and the Updatebatch method is called?
>3) would the master table re-assign new IDs to the auto-incremental
>fields or is some special processing required to handle such scenarios?

>One must consider the fact that there are 2 or more users,
>one disconnects, in the interim others have added new records,
>and continues data entry at home on his/her laptop/notebook,
>a day later the disconnected user reconnects. What happens?

>How does ADO / Delphi  handle this?

>If the briefcase model deals with this cleanly, then a nightmare has
>been solved instantly.

--
Arnold Johnson
 

Re:Briefcase Model


Quote
Arnold Johnson <Arno...@win-pro.demon.co.uk> wrote in message

news:kh5S6HA12XH4EwXk@win-pro.demon.co.uk...

Quote
> AutoIncremental fields could end up being broken when using the
> Briefcase model. I had scenarios where it started renumbering even
> though there were entries in the table, disconnected, worked locally and
> the updated the server. What is the work around.
> Access 2000, Delphi 5 Enterprise, ADO, Windows 98

I just did some quick testing and when I call the UpdateBatch method, the autoinc
field is always assigned a unique value.  Are you seeing it assign numbers in one
client that have already been assigned in another client?

Mark

Re:Briefcase Model


Yes I do. I have had situations were, 2 clients are connected and all
works fine. They disconnect, work locally and update, on one of them,
the **counterfield** started with 0 instead of the next.
ADO did not complain as I did not specify the field to be unique oor as
a primary key, just an Auto-incremental field.
I can always send a demo, with the SQL etc for creating the Access
 database if need be.
In article <7vslc5$8...@forums.borland.com>, Mark Edington (Borland)
<meding...@nolunchmeat.com> writes

Quote
>Arnold Johnson <Arno...@win-pro.demon.co.uk> wrote in message
>news:kh5S6HA12XH4EwXk@win-pro.demon.co.uk...

>> AutoIncremental fields could end up being broken when using the
>> Briefcase model. I had scenarios where it started renumbering even
>> though there were entries in the table, disconnected, worked locally and
>> the updated the server. What is the work around.
>> Access 2000, Delphi 5 Enterprise, ADO, Windows 98

>I just did some quick testing and when I call the UpdateBatch method, the
>autoinc
>field is always assigned a unique value.  Are you seeing it assign numbers in
>one
>client that have already been assigned in another client?

>Mark

--
Arnold Johnson

Re:Briefcase Model


Quote
Arnold Johnson <Arno...@win-pro.demon.co.uk> wrote in message

news:xXj3XBAhihI4EwOW@win-pro.demon.co.uk...

Quote
> I can always send a demo, with the SQL etc for creating the Access
>  database if need be.

I afraid this won't be something I can help you with.  If there is problem with
the initialization of the autoinc values it's probably in the Jet provider or
possibly ADO itself.

Mark

Other Threads