-
adLockOptimistic....
I understand that we need to make the connection to the database adLockOptmistic before we can modify any data in the database. If we were not using pure SQL execution, the code would be:
Set rstCustomers = New Recordset
rstCustomers.Open strSQL, conDatabase, _
adOpenDynamic, adLockOptimistic
But if we use the pure SQL string (without opening a recordset), what would be the code? Where do we put the adLockOptmistic?
-
I assume your talking about an Insert statement.
You don't put the adLockOptimistic anywhere. That is for the recordset. You will simply use the SQL string as a parameter for the connection object's execute method:
Code:
conn.execute "INSERT into table (field1, field2, field3) values 7, 8 9"
That's an over-simplified version.. you will most likely build your SQL string first and pass the string variable to the execute method, but it gives you the idea of the syntax..
-
but,.,.
Problem is if I do not put anything it would come up with an error "Query must be updatable". I thought that was why I couldn't use INSERT INTO of UPDATE SQL commands.
-
Make sure your database is in a directory that can be *written* to by IIS and I'm assuming you already checked the database file to make sure it is not read only.