G
Guest
I am TRYING to insert into a table os a database that I have successfully
opened.
I use a ADODB.Connection object and the Execute method.
The table has only two columns: an autonumber item and a string item.
I continually get a SQL INSERT format error. I have tried many small
variations of the SQL command and I am convinced I am missing something vital.
The code segment id:
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=<yada, yada>
cnn.Execute "INSERT INTO Category values (,'whatever')", , adExecuteNoRecords
I get a INSERT command format error. What am I doing wrong?
PS I have also tried using a ADODB.command object with the same resulting
error, so it must be the SQL string, but why?
opened.
I use a ADODB.Connection object and the Execute method.
The table has only two columns: an autonumber item and a string item.
I continually get a SQL INSERT format error. I have tried many small
variations of the SQL command and I am convinced I am missing something vital.
The code segment id:
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=<yada, yada>
cnn.Execute "INSERT INTO Category values (,'whatever')", , adExecuteNoRecords
I get a INSERT command format error. What am I doing wrong?
PS I have also tried using a ADODB.command object with the same resulting
error, so it must be the SQL string, but why?