Wednesday, March 21, 2012

Primary Key problem in db transfer Access to SQL server

I have an application initially made with Cold Fusion and Access.
I have transferred the db from Access to SQL Server and all the code works fine except for the INSERT statement. SQL Server does not generate an automatic primary key... 'o( any ideas?what was an autonumber in access is an IDENTITY column in sql/server

if you are doing INSERT statements, you do not mention the identity column (same as in access)

if you need to preserve the numbers that existed in the access tables, you can do that (look up the bcp utility and BULK INSERT KEEPIDENTITY in Books Online)

rudy
http://rudy.ca/|||Thanks!

No comments:

Post a Comment