_Esam
asked on
How to insert data autoincrement field (MS Access)
Hi,
I will need to insert data to a table where the primary key is autoincremented.
Assuming my PK is CT_ID (autonumber)
The symbol (?) corresponds to CT_ID
What would be the syntax for the following insert:
strInsert = "insert into COURSES_TAKEN (?, UST_ID, COURSE_ID, SEMESTER, [YEAR], GRADE) values ( ?, 1111, 'CRSID', 'SPRING', 2005, 'A')"
Let me know ..
Thanks.
_Esam
I will need to insert data to a table where the primary key is autoincremented.
Assuming my PK is CT_ID (autonumber)
The symbol (?) corresponds to CT_ID
What would be the syntax for the following insert:
strInsert = "insert into COURSES_TAKEN (?, UST_ID, COURSE_ID, SEMESTER, [YEAR], GRADE) values ( ?, 1111, 'CRSID', 'SPRING', 2005, 'A')"
Let me know ..
Thanks.
_Esam
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
_Esam