Connecting Tech Pros Worldwide Help | Site Map

Autonumber Replica

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 01:55 AM
Myo
Guest
 
Posts: n/a
Default Autonumber Replica

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

  #2  
Old November 13th, 2005, 01:55 AM
Michael \(michka\) Kaplan [MS]
Guest
 
Posts: n/a
Default Re: Autonumber Replica

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" <mhlynn2004@yahoo.co.uk> wrote in message
news:8d21e9d4.0408211714.aeeb6c3@posting.google.co m...[color=blue]
> 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[/color]


  #3  
Old November 13th, 2005, 01:55 AM
M Lynn
Guest
 
Posts: n/a
Default Re: Autonumber Replica

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!
  #4  
Old November 13th, 2005, 01:55 AM
Tom van Stiphout
Guest
 
Posts: n/a
Default Re: Autonumber Replica

On 22 Aug 2004 02:23:20 GMT, M Lynn <mhlynn2004@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.


[color=blue]
>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![/color]

  #5  
Old November 13th, 2005, 01:55 AM
Allen Browne
Guest
 
Posts: n/a
Default Re: Autonumber Replica

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" <mhlynn2004@yahoo.co.uk> wrote in message
news:41280397$0$14447$c397aba@news.newsgroups.ws.. .[color=blue]
> 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.[/color]


  #6  
Old November 13th, 2005, 01:55 AM
XMVP
Guest
 
Posts: n/a
Default Re: Autonumber Replica


"M Lynn" <mhlynn2004@yahoo.co.uk> wrote in message
news:41280397$0$14447$c397aba@news.newsgroups.ws.. .[color=blue]
> 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.[/color]


Access Jet Replication was junk from the beginning, and now it is obsolete
junk. Don't use it.


  #7  
Old November 13th, 2005, 01:55 AM
Michael \(michka\) Kaplan [MS]
Guest
 
Posts: n/a
Default Re: Autonumber Replica

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" <mhlynn2004@yahoo.co.uk> wrote in message
news:41280397$0$14447$c397aba@news.newsgroups.ws.. .[color=blue]
> 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![/color]


  #8  
Old November 13th, 2005, 01:55 AM
Trevor Best
Guest
 
Posts: n/a
Default Re: Autonumber Replica

Myo wrote:
[color=blue]
> 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..[/color]

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.
\__\

  #9  
Old November 13th, 2005, 01:56 AM
David W. Fenton
Guest
 
Posts: n/a
Default Re: Autonumber Replica

Trevor Best <nospam@localhost> wrote in
news:4128b7fd$0$11205$afc38c87@auth.uk.news.easyne t.net:
[color=blue]
> 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.[/color]

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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.