[AccessD] Autonumber Assigned Immediately

Bruen, Bruce Bruce.Bruen at railcorp.nsw.gov.au
Fri Sep 9 01:27:08 CDT 2005


Drew,

I'm not being clear.  What I want/need is a restartable, subsettable and
reusable numbered data item.  IOW I can have lots and lots of the same
numbered item in the table.  The numbering is restarted from 1 at each
test cycle. So test script "GA4578"  may be executed as script number
321 in cycle 1, 712 in cycle 2, 14 in cycle 3 etc.  Essentially its just
a human usable "timestamp" of the order the test was executed in (i.e.
that lines up with the test logs).  Script GA4578 is a subsetted
autonumber created during the test design phase - it is composite of
usecase abbrev + subset number, i.e. this is script 4578 for "general
accounts".  There is also a TD4578 script and a FP4578 etc etc.  
In postgres, (which is where I have been for the last several years btw)
you can set any number of sequence fields in a row and generate the
above things quite easily using sequence "triggers"  - once the initial
set up has been done they all number automagically.  Now that I have
been forced back to an M$ environment I'm just having a grumble that
autonumber just doesn't give me what I need.

bruce

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
DWUTKA at marlow.com
Sent: Friday, 9 September 2005 3:54 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Autonumber Assigned Immediately

Remind me in the morning, but I know there is a property within an ADO
recordset, that if you remove all the records, you can 'reset' the
Autonumber (the property is the 'next' number, if I remember
correctly....)

Drew

	-----Original Message-----
	From:	Bruen, Bruce [SMTP:Bruce.Bruen at railcorp.nsw.gov.au]
	Sent:	Friday, September 09, 2005 12:46 AM
	To:	Access Developers discussion and problem solving
	Subject:	Re: [AccessD] Autonumber Assigned Immediately

	Do you mean the old "create a table with the new start number
and append
	it" method or something else?

	bruce 

	-----Original Message-----
	From: accessd-bounces at databaseadvisors.com
	[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
	DWUTKA at marlow.com
	Sent: Friday, 9 September 2005 3:13 PM
	To: accessd at databaseadvisors.com
	Subject: Re: [AccessD] Autonumber Assigned Immediately

	You can 'restart' an autonumber.

	Drew

		-----Original Message-----
		From:	Bruen, Bruce
[SMTP:Bruce.Bruen at railcorp.nsw.gov.au]
		Sent:	Thursday, September 08, 2005 7:24 PM
		To:	Access Developers discussion and problem solving
		Subject:	Re: [AccessD] Autonumber Assigned
Immediately

		The real problem is that you can only have one
autonumber field
	in a
		record - so by convention "we" all now expect it to be
used as a
		surrogate key.  I have many, many times needed one or
more
	unique
		identifiers (user visble).  Example, in a test
management db I
	need to
		automagically number a test scenario and also assign a
	sequential unique
		number to its execution id.  In addition, how many
problems
	could be
		solved by a "grouped" or restartable autonumber.
		Quite frankly AFAIC autonumber sucks for all uses.

		bruce

		-----Original Message-----
		From: accessd-bounces at databaseadvisors.com
		[mailto:accessd-bounces at databaseadvisors.com] On Behalf
Of
	MartyConnelly
		Sent: Friday, 9 September 2005 10:11 AM
		To: Access Developers discussion and problem solving
		Subject: Re: [AccessD] Autonumber Assigned Immediately

		Just use autonumber keys that are GUID's and watch the
tears
	flow.

		Charlotte Foust wrote:

		>And even if they are sequential, it doesn't mean
they're
	consecutive!
		>
		>Charlotte Foust
		>
		>
		>-----Original Message-----
		>From: Ken Ismert [mailto:KIsmert at texassystems.com]
		>Sent: Thursday, September 08, 2005 3:55 PM
		>To: Access Developers discussion and problem solving
		>Subject: Re: [AccessD] Autonumber Assigned Immediately
		>
		>
		>
		>  
		>
		>>>IMO, the autonumber field is simply a way to create
	sequential 
		>>>numbering without writing a bunch code to do so.
		>>>      
		>>>
		>
		>You can't assume Autonumbers are sequential. You can
specify
	random new

		>values for an Autonumber field. Further, for
replication,
	Access will 
		>change all Autonumber fields to random, to reduce key
	collisions.
		>
		>So, you can only assume that Autonumbers are unique. 
		>
		>If you change Autonumber modes, knowingly or not, you
can be
	fairly

		>sure your users will freak when they see "-1.07E+09" as
the
	next 
		>reference number on a report using an Autonumber field.
		>
		>-Ken
		>  
		>

		--
		Marty Connelly
		Victoria, B.C.
		Canada



		-- 
		AccessD mailing list
		AccessD at databaseadvisors.com
		http://databaseadvisors.com/mailman/listinfo/accessd
		Website: http://www.databaseadvisors.com



		This e-mail and any attachments may contain confidential
	information that is intended solely for the use of the intended
	recipient and may be subject to copyright. If you receive this
e-mail in
	error, please notify the sender immediately and delete the
e-mail and
	its attachments from your system.  You must not disclose, copy
or use
	any part of this e-mail if you are not the intended recipient.
Any
	opinion expressed in this e-mail and any attachments is not an
opinion
	of RailCorp unless stated or apparent from its content. RailCorp
is not
	responsible for any unauthorised alterations to this e-mail or
any
	attachments. RailCorp will not incur any liability resulting
directly or
	indirectly as a result of the recipient accessing any of the
attached
	files that may contain a 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



	This e-mail and any attachments may contain confidential
information that is intended solely for the use of the intended
recipient and may be subject to copyright. If you receive this e-mail in
error, please notify the sender immediately and delete the e-mail and
its attachments from your system.  You must not disclose, copy or use
any part of this e-mail if you are not the intended recipient.  Any
opinion expressed in this e-mail and any attachments is not an opinion
of RailCorp unless stated or apparent from its content. RailCorp is not
responsible for any unauthorised alterations to this e-mail or any
attachments. RailCorp will not incur any liability resulting directly or
indirectly as a result of the recipient accessing any of the attached
files that may contain a 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



This e-mail and any attachments may contain confidential information that is intended solely for the use of the intended recipient and may be subject to copyright. If you receive this e-mail in error, please notify the sender immediately and delete the e-mail and its attachments from your system.  You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.  Any opinion expressed in this e-mail and any attachments is not an opinion of RailCorp unless stated or apparent from its content. RailCorp is not responsible for any unauthorised alterations to this e-mail or any attachments. RailCorp will not incur any liability resulting directly or indirectly as a result of the recipient accessing any of the attached files that may contain a virus. 



More information about the AccessD mailing list