Don Elliker
delliker at hotmail.com
Thu Aug 28 14:37:51 CDT 2003
Nevermind....engage brain. The code I snipped for the autonumber thingie was closing my workspace. So, as usual, the machine was exactly and perfectly correct. Pictures at 11:00. _d "Things are only free to the extent that you don't pay for them".-Don Elliker >From: "Don Elliker" <delliker at hotmail.com> >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: accessd at databaseadvisors.com >Subject: [AccessD] Custom autonumbers and error 3420 >Date: Thu, 28 Aug 2003 14:41:55 -0400 > > >I have removed the autonumber PK from all my tables, replacing it with a >Long. Everything seems to work except for the fact that after any operation >involving the BE database I lose my connection to it and receive a 3420 >'Object invalid or no longer set' error. This error is generated on the >next reference to the BE (database object) > >The BE database is opened and connected on startup and the connection stays >open for the duration (or it used to). The only change ,so far, is to the >Autonumber PK and the 'before_insert' event logic to populate the Long with >the next autonumber from a separate Autonumber Database (value retrieved is >also a long). > >Thoughts? > >TIA, >_D > > >"Things are only free to the extent that you don't pay for them".-Don >Elliker > > > > > >>From: "Heenan, Lambert" <Lambert.Heenan at aig.com> >>Reply-To: Access Developers discussion and problem >>solving<accessd at databaseadvisors.com> >>To: "'Access Developers discussion and problem solving'" >><accessd at databaseadvisors.com> >>Subject: RE: [AccessD] Custom autonumbers and replication >>Date: Mon, 25 Aug 2003 16:50:51 -0400 >> >>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 >>_______________________________________________ >>AccessD mailing list >>AccessD at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/accessd >>Website: http://www.databaseadvisors.com > >_________________________________________________________________ >Get MSN 8 and help protect your children with advanced parental controls. >http://join.msn.com/?page=features/parental > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com _________________________________________________________________ MSN 8: Get 6 months for $9.95/month. http://join.msn.com/?page=dept/dialup