hello
i am tryig to get my vb form to creata new table in an existing db
i am using the following code
Option Explicit
Private Sub cmdCreateTable_Click()
Dim conScores As ADODB.Connection
Dim strSQL As String
Set conScores = New ADODB.Connection
conScores.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source='C:\temp\db3.mdb'"
MsgBox "A table named Scores has been added to the db3.mdb database"
Set conScores = Nothing
End Sub
i get "sytax error in field defintion"
what have i missed
Mac
07-26-2005, 01:05 PM
pclement
You're missing a comma:
"opt9 bit," & "opt10 bit," & "opt11 bit," & _
07-26-2005, 01:07 PM
MacataQ
omg , what a dope i am
cant see whats in front of me..lol
thanks Paul
07-26-2005, 01:27 PM
mstraf
jeez Paul, you DO have a good eye!
In cases like this, I prefer to create my command string in a loop, because I know that I will miss something... besides my eyesight
Marco
07-26-2005, 02:24 PM
pclement
Yeah, I only spent about five minutes looking at the statement before I finally noticed the missing comma. ;-)