|
-
Aug 19th, 2003, 03:06 AM
#1
Thread Starter
Junior Member
Expected query name after execute
I want to make a querie wich alters my table like this:
Dim cmd As New OleDb.OleDbCommand
cmd.CommandText = "ALTER TABLE Crawford_nl ADD COLUMN [Index] COUNTER PRIMARY KEY"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = Me.OleDbConnection1 '
Try
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(Err.Number & ":" & Err.Description)
End Try
I get the error message:
"Expected query name after EXECUTE"
When I do the same, but change 'OleDb' to 'Odbc', it works, but I want to do it with OleDb.
Can anyone help me?
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
|