Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP INSERT INTO

Status
Not open for further replies.

Fredde

Programmer
May 10, 2001
22
0
0
SE
I have a problem with an INSERT INTO using ASP connected to Access.The problem is that I get promted
"Index or primary key cannot contain a Null value." when I do the following insert:

INSERT INTO tblHardware(Devicetype) VALUES('something')

Devicetype is not the primary key. The primary key is a field that is set to autonumbers.

Since I want the primary key to be an autonumber I don't want to insert that number, please help me.

/Fredrik
 
Make sure that your PK is working properly. Then check to make sure that "allow zero length" is set to "yes" for any columns that you are not populating.

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top