im hoping this is a simple one.
im using ADODB.Execute to run an SQL command. it worked perfectly fine at work, but now on my home machine its kicking up an error "incorrect CREATE TABLE syntax"
as i said, on my work machine (XP pro) the syntax works and does create the table, however on my home machine (2k pro) it errors unless i remove AUTO_INCREMENT from the sql string.
any input appreciated
If somethings hard to do, its not worth doing - Homer Simpson
im using ADODB.Execute to run an SQL command. it worked perfectly fine at work, but now on my home machine its kicking up an error "incorrect CREATE TABLE syntax"
Code:
Public Const sqlCreatePlayerTable As String = "CREATE TABLE PlayerData (PlayerID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, PlayerHandle char(25))"
Public Sub CreateStorageDB()
Dim oADOX As Object
Dim oADODB_CN As Object
Set oADOX = CreateObject("ADOX.Catalog")
oADOX.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\Tracker.mdb"
Set oADOX = Nothing
Set oADODB_CN = CreateObject("ADODB.Connection")
oADODB_CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\Tracker.mdb"
oADODB_CN.Open
oADODB_CN.Execute sqlCreatePlayerTable
oADODB_CN.Close
Set oADODB_CN = Nothing
End Sub
as i said, on my work machine (XP pro) the syntax works and does create the table, however on my home machine (2k pro) it errors unless i remove AUTO_INCREMENT from the sql string.
any input appreciated
If somethings hard to do, its not worth doing - Homer Simpson