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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with auto increment(autonumber) in DLL 1

Status
Not open for further replies.

Fred48

Programmer
Feb 23, 2004
62
US
Hi,

I am updating a DLL from ActievX to OLEDB and I am having a problem with a field that needs to be defined with auto increment. I get an error messenge, "Syntax error in CREATE TABLE statement". Below is a portion of the code:
strSQL = "CREATE TABLE tblCdd (" & _
"[ID] int autonumber," & _
"TrafficClass char (2)," & _
"TrafficUse char (2)," & _
"ConvCode char (1)," & _
"BlkObj char (2)," & _
"ECCS char (3)," & _
"Primary Key([ID]))"

I have used both auto_increment and auto_number both with the same results.

If anyone could provide any help would be greatly appreciatvie.

Thanks,

Fred
 
I would suggest that you remove the last comma. There should not be a comma before your Primary Key.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Riverguy,

You did it again, thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top