|
-
Mar 20th, 2000, 03:38 AM
#1
Thread Starter
Junior Member
SQL Insert having an auto number field..
Hi there,
I have an auto-number field, and two number fields in a table.
How do I write an insert statement to insert values in the table ?
I tried this but it failed..
db.Execute "insert into doc(auNum,numA,numB) values ( ,cid,mid,);"
where cid and mid hold the values of the numbers to be inserted.
I also tried :
db.Execute "insert into doc(cID,mID) values(x,y);"
without any success.
It says: "Too few parameters. Expected 2"
Any help/comments on this will be grateful.
Thank You
Hemang
[Edited by zambian on 03-20-2000 at 04:59 PM]
-
Mar 20th, 2000, 04:14 AM
#2
Lively Member
Have you tried this:
db.Execute "insert into doc(numA,numB) values (cid,mid);"
-
Mar 20th, 2000, 11:16 PM
#3
Addicted Member
Try
db.Execute "insert into doc(cID,mID) values(" & x & "," & y & ");"
If the values are strings you will have to enclose them in single quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|