Identity_Insert from access?

E

Eric

Hi.

I upsized the data.mdb portion of my application to SQLServer, and had to
create a primary key to link it back to access. I am now trying to insert
records, but was hoping for SQLServer to handle the Primary key similar to
an access autonumber field. . .

I think Identity Insert will do that. . . I think it's one table at a time
(I could live with that restriction).

Can I set that from VB. . . thinking I would do it on form load, and turn it
off on form unload. . .

thanks

e
 
M

Mary Chipman

If your SQLS column is an identity column, you don't need to do
anything for it to automatically generate a new ID. Identity insert is
only for when you want to override it and manually insert your own
value in the column.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446
 
J

Joe Fallon

Right.
Just omit the Identity field in your Insert commands.
The database will then insert the next value for you.
 

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