Tags: access, ado, adonet, autonumber, column, columns, dataadapter, identity, insert, net, table, update
IDENTITY INSERT with Access 2000 and ADO.NET
2,012 words with 2 Comments; publish: Tue, 20 May 2008 13:05:00 GMT; (10046.88, « »)
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?
http://net-ado.itags.org/q_dotnet-ado_103061.html
All Comments
Leave a comment...
- 2 Comments

- 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.
--
Regards
Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever
"sanj" <kutchi010203.net-ado.itags.org.hotmail.com> wrote in message
news:072d01c3947a$5fc40a30$a401280a.net-ado.itags.org.phx.gbl...
> 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?
>
#1; Tue, 20 May 2008 13:06:00 GMT

- On Thu, 16 Oct 2003 23:46:21 -0700, "sanj" <kutchi010203.net-ado.itags.org.hotmail.com> wrote:
¤ 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 ~~~ pclement.net-ado.itags.org.ameritech.net
Microsoft MVP (Visual Basic)
#2; Tue, 20 May 2008 13:07:00 GMT