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
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