Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Command Lock Type?

Status
Not open for further replies.

SneezeDragon

Programmer
Mar 6, 2002
13
0
0
US
The ADO Command object doesn't appear to have a LockType property.

Does anyone know how locking is performed on a database table when Command.Execute is used to execute a SQL update statement (no recordsets involved)? Is this locking up to the database itself, or is there some sort of default built into the Command object?

TIA!
 
The LockType property can be accessed through the recordset object. It also depends somewhat on the backend, eg older versions of Access have page locking, not record locking and you can't avoid locking several records at once.

Paul Bent
Northwind IT Systems
 
I need to correct my first post. The Command is actually executing a stored procedure call with parameters. So we set the parameter values and then simply call Command.Execute. No recordsets are involved, so there isn't a recordset object through which I can access LockType.

The database is Oracle 8. Is locking entirely up to the database, then?
 
Yes, in the case of a stored procedure, locking would be handled by the database while the stored procedure executes.

The ADO LockType property only applies to a recordset and the specific rows it contains.

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top