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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHECK IF MYSQL TABLE OR RECORD IS LOCKED

Status
Not open for further replies.

123jon

Programmer
Jan 11, 2003
14
US
I am using VB6 to add records to a MySQL database. I would like to know how to check if a table or record is already locked.


See the code below :--

sSQL = "Update ItCustmr Set...etc. etc."

'BEFORE LOCKING I WOULD LIKE TO CHECK IF THE TABLE 'ITCUSTMR' IS ALREADY LOCK.

adoDatabase.Execute ("LOCK TABLES ITCUSTMR WRITE") 'Locking table

adoDatabase.Execute sSQL 'Update Table

adoDatabase.Execute ("UNLOCK TABLES") ' UnLocking table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top