IDENTITY INSERT with Access 2000 and ADO.NET

S

sanj

I'm using ADO.NET (using a dataadapter update) to update
data in an Access data table. One of the columns is an
Autonumber column, but I want this column to contain the
values I sepcifically want inserted, not the autonumbers
generated. I know you can achieve this in SQL Server by
using the IDENTITY INSERT feature. Does anyone know how I
can do this with Access?
 
T

Tim Stephenson

If you need to manually update the autonumber field, it would be better to
not use autonumbers for that field.
I don't think there's a way to easily disable the autonumber for an update,
and then reenable it afterwards.
 
P

Paul Clement

¤ I'm using ADO.NET (using a dataadapter update) to update
¤ data in an Access data table. One of the columns is an
¤ Autonumber column, but I want this column to contain the
¤ values I sepcifically want inserted, not the autonumbers
¤ generated. I know you can achieve this in SQL Server by
¤ using the IDENTITY INSERT feature. Does anyone know how I
¤ can do this with Access?

In Access, if you want to supply your own values you will need to change the data type from
AutoNumber to something else.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top