Cannot insert the value NULL into column

J

jl_forum

Hi guys, I did a DTS conversion of my Access 2K database into SQL Server. All the data went through fine as far as I can tell. I then created an ODBC connection to it and am trying to use my old Access functions. I took my old Access database, replaced all the old tables with linked ODBC tables with the same name, etc. My forms open up correctly, I can browse through them properly, etc. However, if I try to enter a record, it states that I "cannot insert the value NULL into column". This occurs if I try to create a new record. Please note that this record used Autonumber from Access 2K and was the primary key. How do I get the SQLServer to recognize it? The autonumber usually displays on the form I am using once I begin to enter information, but there is no number appearing. When I try to save the record, I get that message. Please help!!! Thanks.
Sinceerly,
JL
 
D

Douglas J. Steele

What did the Autonumber field get converted into? The equivalent in SQL
Server is an Integer, with its Identity property set. Unlike Autonumber
fields in Access, though, the value of an Identity field doesn't get set
until you actually save the record.

Assuming this is how your field was created, you don't have the field in
your Insert statement, do you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



jl_forum said:
Hi guys, I did a DTS conversion of my Access 2K database into SQL Server.
All the data went through fine as far as I can tell. I then created an ODBC
connection to it and am trying to use my old Access functions. I took my old
Access database, replaced all the old tables with linked ODBC tables with
the same name, etc. My forms open up correctly, I can browse through them
properly, etc. However, if I try to enter a record, it states that I "cannot
insert the value NULL into column". This occurs if I try to create a new
record. Please note that this record used Autonumber from Access 2K and was
the primary key. How do I get the SQLServer to recognize it? The autonumber
usually displays on the form I am using once I begin to enter information,
but there is no number appearing. When I try to save the record, I get that
message. Please help!!! Thanks.
 

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