[AccessD] Custom autonumbers and replication

Heenan, Lambert Lambert.Heenan at AIG.com
Mon Aug 25 15:50:51 CDT 2003


Does sound a bit like a catch 22.

Why do you say that you cannot use prefixes? If you could it would make like
fairly simple.

Suggestion.

Each replica should have it's own table of table AutoNumbers, with one
record holding the prefix to be used with that replica.

The AutoNumber allocation routine would call

 
Dmax("HandRolledAutoNumberField,"TableName","Left(HandRolledAutoNumberField,
Len(ReplicaPrefix))='" & ReplicaPrefix & "'") 

to find the current highest AutoNumber value.

Then strip off the prefix, increment the remaining number  and tack on the
prefix again.

Should work. (FLW)


Lambert


> -----Original Message-----
> From:	Don Elliker [SMTP:delliker at hotmail.com]
> Sent:	Monday, August 25, 2003 2:28 PM
> To:	accessd at databaseadvisors.com
> Subject:	[AccessD] Custom autonumbers and replication
> 
> The ADH has a bit on using a custom autonumber in place of Autonumber
> which 
> I want to use for tables involved in replication. What I don't get is, if 
> the replication scheme does not include the database where the new 
> autonumbers are kept (The idea is to have tables stored in a separate 
> database wherin only the next autonumber is manipulated for each table.
> The 
> requesting function calls with the table name, locks it , gets the 'next' 
> value, increments by 1 and frees up the table for the next user.) so OK, 
> swell, sounds good..but , if these 'autonumber' tables reside in a
> database 
> not in the Replication scheme....what is the benefit? How will I connect
> to 
> it? From each database separately to the common autonumber 
> database?........I think I must be missing something. I have used 
> replication before , but never with this kind of a key (autonumber or a 
> single field, unique number)
> -As an added bonus,I cannot use prefix/ identifiers like TED001 for Ted's 
> stuff , etc. I don't know if I can seed the individual master tables
> (which 
> get the majority of the updates) with a value sufficiently distant from
> one 
> another, or ,have them increment in odds or evens...(going nuts now)
> 
> Any Replication smarties out there???
> 
> 
> "Things are only free to the extent that you don't pay for them".-Don 
> Elliker
> 
> _________________________________________________________________
> Get MSN 8 and enjoy automatic e-mail virus protection.    
> http://join.msn.com/?page=features/virus
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list