|
-
May 8th, 2001, 12:30 AM
#1
Thread Starter
Lively Member
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?
-
May 8th, 2001, 01:08 PM
#2
Frenzied Member
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..
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
May 8th, 2001, 09:48 PM
#3
Thread Starter
Lively Member
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.
-
May 8th, 2001, 10:24 PM
#4
Frenzied Member
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.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
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
|