Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Auto number


Message #1 by "Darran Roper" <droper@o...> on Fri, 12 Oct 2001 15:26:30
I am trying to create an access database through ASP+Sql  

this works fine but i am unable to create the Autonumber field on 

creation, 

I have foolishly tried SQL identity(1,1) but of course this dosent work. 

So , What does.



Message #2 by "Preethi" <preethi@s...> on Sat, 13 Oct 2001 09:31:03 +0600
I am using a different method:



I have a template table with only one field (which is auto number)

Then I create a new table using Select * into <New Table Name> From

<tamplate>

Afterwards I add Columns to the new table.





----- Original Message -----

From: "Darran Roper" <droper@o...>

To: "Access" <access@p...>

Sent: Friday, October 12, 2001 03:26 PM

Subject: [access] Auto number





> I am trying to create an access database through ASP+Sql

> this works fine but i am unable to create the Autonumber field on

> creation,

> I have foolishly tried SQL identity(1,1) but of course this dosent work.

> So , What does.

>

>

Message #3 by "Sanna Korpela" <sanna.m.korpela@l...> on Tue, 16 Oct 2001 12:46:25
What if you would use if-sentence to create your own "autonumber". When 

you add a row, the program would check wich is the last number and then 

add one to it. I think that allways work better then the autonumber in 

access or sql. Then when you delete a row, you can minus one from all the 

rows so there will not be "blank numbers". You can either do this in 

ASP/VBA or if you are used to make procedures in SQL, that would be 

propably the best way to handle it.



> I am trying to create an access database through ASP+Sql  

> this works fine but i am unable to create the Autonumber field on 

> creation, 

> I have foolishly tried SQL identity(1,1) but of course this dosent work. 

> So , What does.

> 


  Return to Index