Please help

Please help

Post by Al » Sat, 28 Aug 2004 02:13:12


I will be converting my database back end to a replica. I
have many tables with autonumber. I know that the replica
will change the autonumber from increment to random and
this is going to cause me a problem. The order is important
for me. What should I do? I was thinking to change the
autonumber fields to Number (LongInteger) or create another
number field and use it to order the records and increment
programatically. The problem with that is that some of the
data is imported from a text file or excel spread sheet and
I do not know how to control that as to increment the
numbers? Any help will be greatly appreciated. Thank you
Al
 
 
 

Please help

Post by Stephen Ra » Sat, 28 Aug 2004 02:24:48

If order matters and it may come from many sources (replicas), then one
solution is to use a dateTime field as your order code. It will not be
incremented, but you get a known order (assuming no one tampers with the
clock). If there is a risk of two records being created on the same
second, you can use the Timer() function to get ticks down to below
millisecond.

Another solution is to give each replica a Prefix. Increment a counter in
the replica and generate a String Key of PrefixNumber. Within each
replicas sources, you will have an incrementing counter, but different lists
for each replica. Kind of like several books of receipts: each book is
sequential, but there is no order between the books.

Let us know what you decide.
Stephen Rasey
Houston
http://www.yqcomputer.com/
http://www.yqcomputer.com/

 
 
 

Please help

Post by Al » Sat, 28 Aug 2004 23:59:14

Stephen, thank you for replying. I would like to bring
your attetion to that fact that most of the data are
entered by importing form a text file or excel. if I am
using the timer how is this going to work? would it not
stamp the same time on all records imported together?
Al
(replicas), then one
code. It will not be
tampers with the
on the same
down to below
Increment a counter in
Within each
but different lists
receipts: each book is
message

I
replica
important
another
increment
the
and
 
 
 

Please help

Post by Stephen Ra » Sun, 29 Aug 2004 02:36:21

hadn't considered a batch load.

I personally have not done this, so if anyone with more battle experience
wants to chime in, please do.

Here is one suggestion that retains the easy of a batch import of data and
keeps a sequential autonumber.

Make a local copy of the replicated table(s) for batch input. Make a
pseudo primary key (PsPK) an autonumber. In each replica, start the
primary key at a different big number, like 10000000, 20000000, 30000000.
Batch load your data into the local.

In the replicated table, it has the real primary key as an Autonumber
random. The replicated table will also need the PsPK as a Number (not
autonumber), Indexed No Dups.

Append the data from the local batch load data into the replicated table.
Delete the data in the local batch load. The Local PsPK should continue to
increment even after the records have been deleted.

That is the best solution I can think of without a lot of record by record
VBA processing.

As I said, I have not done this myself. Caveat Emptor^2. Free Advice is
sometimes worth something, sometimes not.

Please let me know what you do.
Stephen Rasey
Houston
http://wiserway.com
http://excelsig.org

"Al" < XXXX@XXXXX.COM > wrote in message
news:152801c48c46$6b1f28a0$ XXXX@XXXXX.COM ...


 
 
 

Please help

Post by V2luZDU0U3 » Thu, 14 Oct 2004 07:33:05

Hi,

Lately after 2 problem free years synchronizing I have been
getting these:
"Cannot place a write lock"

It only happens between 2 computers out of 5, always the
same computers.

Does anyone knows what it means and /or why it happens.

Thanks in advance,
Emilio
 
 
 

Please help

Post by V2luZDU0U3 » Thu, 14 Oct 2004 07:39:03

Hi,

Lately after 2 problem free years synchronizing I have been
getting these:
"Cannot place a write lock"

It only happens between 2 computers out of 5, always the
same computers.

Does anyone knows what it means and /or why it happens.

Thanks in advance,
Emilio
 
 
 

Please help

Post by ZGNocmlzdG » Sun, 23 Jan 2005 05:23:01

Can you tell me please how you resolved this problem, I am now having the
same difficulty.