When using the ADODB.Connection.Execute
command, if the query returns a recordset, the ADODB.Recordset
object can be checked for validity to confirm if the query/command was executed successfully.
Example:
SELECT * FROM users
If a command that updates rows but does not return records is executed, the ADODB.Connection.Execute
command writes to the optional RecordsAffected
variable. Is a count of the records affected and can be used to confirm if the query/command was executed successfully.
Example:
UPDATE users SET active = '0' WHERE...
How would you confirm if the query/command was executed successfully in the following example, or any situation where you are issuing a command that doesn't return records and no records are being affected?
Example:
SAVEPOINT FIRST_SAVEPOINT
Note: I am using OraOLEDB as my provider for the connection string.