By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Autonumber Replica

P: n/a
Myo
Hi all!

I've replicated my Access DB using briefcase in winXP. All Autonumber
PK changed to random number. They were increment b4. Fortunately i
could recover it through my backup. I just want to know if there's
anyway to replicate the tables without letting the windows to change
my design? Thanks in advance..

Myo
Nov 13 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
No, this is by design, and how Jet replication is documented.
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Myo" <mh********@yahoo.co.uk> wrote in message
news:8d*************************@posting.google.co m...
Hi all!

I've replicated my Access DB using briefcase in winXP. All Autonumber
PK changed to random number. They were increment b4. Fortunately i
could recover it through my backup. I just want to know if there's
anyway to replicate the tables without letting the windows to change
my design? Thanks in advance..

Myo

Nov 13 '05 #2

P: n/a
Sorry.. my request was incomplete. Yes.. the design has changed to
random number. I dont want it to change. The records are fine, but when
i tried to add a new record, it starts giving me random numbers. I just
wanted increments.

Thanks 4 ur reply.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

P: n/a
On 22 Aug 2004 02:23:20 GMT, M Lynn <mh********@yahoo.co.uk> wrote:

If you don't want the design to change to Random, don't use Briefcase
or any other form of replication.
Too bad you care what the values of your autonumbers are. This is a
FAQ: it has been argued here many times (just check with
groups.google.com) that this is a bad idea.

-Tom.
Sorry.. my request was incomplete. Yes.. the design has changed to
random number. I dont want it to change. The records are fine, but when
i tried to add a new record, it starts giving me random numbers. I just
wanted increments.

Thanks 4 ur reply.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #4

P: n/a
M, think about what you are asking for.

You want a replica, so presumably you want to use the database at 2 or more
locations at the same time, and then synchronize. At location A, you want to
be able to add a new record, and get the next number, not a random one. At
location B, you also want a new record to get be given the next available
number, but they must not be given the same number???

There is good reason why replicas cannot use sequential numbering. (And you
can trust anything that michka says about replication.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"M Lynn" <mh********@yahoo.co.uk> wrote in message
news:41**********************@news.newsgroups.ws.. .
Sorry.. my request was incomplete. Yes.. the design has changed to
random number. I dont want it to change. The records are fine, but when
i tried to add a new record, it starts giving me random numbers. I just
wanted increments.

Nov 13 '05 #5

P: n/a

"M Lynn" <mh********@yahoo.co.uk> wrote in message
news:41**********************@news.newsgroups.ws.. .
Sorry.. my request was incomplete. Yes.. the design has changed to
random number. I dont want it to change. The records are fine, but when
i tried to add a new record, it starts giving me random numbers. I just
wanted increments.

Thanks 4 ur reply.

Access Jet Replication was junk from the beginning, and now it is obsolete
junk. Don't use it.
Nov 13 '05 #6

P: n/a
Sorry, you can't have that -- replication does not work that way.
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
"M Lynn" <mh********@yahoo.co.uk> wrote in message
news:41**********************@news.newsgroups.ws.. .
Sorry.. my request was incomplete. Yes.. the design has changed to
random number. I dont want it to change. The records are fine, but when
i tried to add a new record, it starts giving me random numbers. I just
wanted increments.

Thanks 4 ur reply.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #7

P: n/a
Myo wrote:
Hi all!

I've replicated my Access DB using briefcase in winXP. All Autonumber
PK changed to random number. They were increment b4. Fortunately i
could recover it through my backup. I just want to know if there's
anyway to replicate the tables without letting the windows to change
my design? Thanks in advance..


First the golden rule of AutoNumber: The User Doesn't See it!

After observing that rule it's easy to work out that increment or
random, it doesn't matter, computers aren't fussy, as long as it's
unique is all it cares about.

IOW if your number is supposed to mean something to a human, don't use
AutoNumber. If you need an incrementing number you should roll your own
(plenty of examples in the google archive).

Your problem will be from using multiple sites all wanting an
incrementing number, it would be quite slow if a satellite site was t
oconnect to the main site to get the next number so you need another method.

The way I do for multiple warehouse receipt numbers is
WarehouseNo/Increment, if you must have only one series of numbers you
could pool them, IOW when satellite connects to main to replicate you
also then look at the number pool and take say if you expect 10
transactions before next replication take 15 numbers minus the number of
numbers you had left over from last replication.

--

\\\\\\
\\ \\ Windows is searching
\ \ For your sig.
\ \ Please Wait.
\__\

Nov 13 '05 #8

P: n/a
Trevor Best <nospam@localhost> wrote in
news:41***********************@auth.uk.news.easyne t.net:
The way I do for multiple warehouse receipt numbers is
WarehouseNo/Increment, if you must have only one series of numbers
you could pool them, IOW when satellite connects to main to
replicate you also then look at the number pool and take say if
you expect 10 transactions before next replication take 15 numbers
minus the number of numbers you had left over from last
replication.


The easier way to do this in a replicated database is to use a
compound key, one column indicating the replica, and the second the
unique ID in that replica's data set.

Of course, if you really need a human-readable number in sequence,
you're going to have to pre-allocate ranges of numbers to each
replica, as you say.

From my point of view, jet replication has simply been made obsolete
by the ease of use and cheapness of implementing Windows Terminal
Server. The only scenario I can think of where that won't work is
something like laptop users who have to work disconnected in the
field and then connect to the home base to synch. Replication is
still viable there, but I don't see much need for something like
invoice numbers in that scenario, since the folks in the field are
not going to be responsible for billing (work order numbers or
quotation numbers or something like that could easily be uniquely
keyed to the replica or to the user who created them).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.