Hey guys, Just trying to design a table which as one key that signifies a document. And the other key signifies the sections in the document. But the overall document can change as well. I.e. DOCUMENT 1 - Section 1/2/3/4 DOCUMENT 2 - Section 1/2 DOCUMENT 3 - Section 1 DOCUMENT 4 - Section 1/2/3/4 So basically, the section IDs should start again. Here is the table i'm making with in MySQL: And then in my ASP pages, I tried to do this: But I get this error when the page runs: So is there a way to get something implemented this way? Sorry I am new at SQL/ASP so anything would be helpful! Thanks, Duncan
You have declared the fields as NOT NULL, making it compulsory for it to be assigned a value. Why don't you just use '0' instead of null when inserting
Thanks for the reply. With 0 it works, but I need this to restart counting back at one. (as required by the specifications of this project). So for every new document, I'll need the section ID to start back at 1 again. Is this possible?