SQLSTR is an update SQL statement
I want to know, updated a few records the total? Could you tell me how to write the great god the?
CodePudding user response:
The execute method can use the connection object:
Set the conn=createobject (" adodb. Connection ")
Conn. Open the Provider="Microsoft. Jet. The OLEDB. 4.0; Data Source=C: \ Documents and Settings \ Administrator \ \ Database2 desktop MDB;"
Conn. Execute "update table 1 set a=3 where a=3", recordaffected, 1
Msgbox recordaffected
CodePudding user response:
If they are used, can also use the "select @ @ rowcount" return on operations affect the number of rows.CodePudding user response:
Con. The execute SQLSTR, recordaffected, including recordaffected is to update the number of rowsCodePudding user response:
Rs. The Open SQLSTR, con, 1, 3 in the back of the 1, 3 is the database cursor Settings, if it is 1, 3 can't modify the record, is because the cursor record, does not allow changes, general modified or new cursor Settings must be in 3, 2,CodePudding user response: