ADO, MySQL, and VB6 Record Locking
Posted on 2007-07-24
So, here's the story:
I am writting a VB6 program that accesses a MySQL server to get info and write info. I am using ADO to make the connections.
The program gets a recordset and calls a phone number from that recordset. If the caller answers, it sets the status of the call to accepted.
This program works mostly fine. The problem I need to run multiple instances of the program. When I try that, every instance of the program tries to call the first record at the same time. I need to find a way for the program to check if a record is already being accessed from another program. I can lock the write function, but how do I stop it from trying to read the record as well?
I saw a stored procedure for SQL on this site, but it doesn't work (or so it seems) for MySQL. I am open to doing it with ADO and VB6 or with MySQL stored procedures that I can access from VB6. Any ideas are welcome. Thanks.