ASP Recordset Insert

  • Thread starter Aaron Bertrand - MVP
  • Start date
A

Aaron Bertrand - MVP

Does anybody have any good articles or tips on how to do a insert when you
have a primary key that is auto increment?

You don't mention that column, because you aren't supposed to be supplying a
value to it. Let's say your table is:

Table:
foo
Columns:
ID (AutoIncrement)
Name (text(32))
Active (int)

Your insert statement would be:

INSERT foo(Name, Active) VALUES('blat', 1)
 
B

Biggie

I'm using ASP 3.0 and SQL Server 2000. I do a insert from a form into a
table. When I do the insert I get a error that the primary key cannot be
Null.

Does anybody have any good articles or tips on how to do a insert when you
have a primary key that is auto increment? Or how to handle the primary key
insert.
 

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

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top