IDENTITY INSERT with Access 2000 and ADO.NET

  • Thread starter Thread starter sanj
  • Start date Start date
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?
 
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.
 
¤ 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)
 
Back
Top