6 messages in com.mysql.lists.win32RE: VB6 And LOCK TABLE| From | Sent On | Attachments |
|---|---|---|
| Glenn | 04 Feb 2000 16:59 | |
| sin...@mysql.com | 05 Feb 2000 04:50 | |
| Glenn | 05 Feb 2000 07:00 | |
| sin...@mysql.com | 05 Feb 2000 07:17 | |
| Jim Willard | 07 Feb 2000 07:46 | |
| Glenn | 08 Feb 2000 03:39 |
| Subject: | RE: VB6 And LOCK TABLE![]() |
|---|---|
| From: | Glenn (g1e...@earthlink.net) |
| Date: | 02/08/2000 03:39:52 AM |
| List: | com.mysql.lists.win32 |
I am not really interested in locking tables in my application. What I was trying to do is to see how a VB client responds to a locked table, and what provisions my code should have for it. Even if my code never locks a table, it is certainly possible that a different application, written by someone else, could use the same table and lock it. If it did, my application would hang until the table is unlocked by the other application.
I am just learning to work with mySQL so this issue isn't critical right now, but I am curious as to why VB would hang when connected to a locked mySQL table, and generate an error (the preferred response), when connected to other tables (like Access ).
-----Original Message----- From: Jim Willard [mailto:jwil...@minn.net] Sent: Monday, February 07, 2000 10:47 AM To: sin...@mysql.com; g1e...@earthlink.net Cc: win...@lists.mysql.com Subject: Re: VB6 And LOCK TABLE
I have to agree wth Sinisa... Dont lock the tables.
Write all your applications with the "get in - get out" approach. This will avoid any conflicts. We are using MySQL with VB -ASP on a site that is taking about 5,000 hits a day, and we NEVER have access violations.
-----Original Message----- From: sin...@mysql.com <sin...@mysql.com> To: g1e...@earthlink.net <g1e...@earthlink.net> Cc: win...@lists.mysql.com <win...@lists.mysql.com> Date: Saturday, February 05, 2000 9:07 AM Subject: RE: VB6 And LOCK TABLE
Glenn writes:
If I understand your question right, you are asking why does not LOCK
TABLES timeout ??
No, actually the reverse. The VB application should time out on its attempt to write to the locked table, but it does not. It just hangs there until I issue an UNLOCK on the server. So VB knows the table it wants is locked, and waits forever. Its expected behavior is to wait only 5 seconds (or whatever timeout is set to) and then create an ERROR. I can't get it to ERROR out, so it just waits and waits until the table is available.
So, the problem is with ODBC or VB I guess.
Hi!
I worked little, very little with VB, and I do not think it is it's fault.
When some other thread locks tables, and VB program issues a command , with update on the same table, then control is not returned to VB until command is finished. And command will not finish until UNLOCK by the owner thread is performed !!
Best advice I can give you is: Do not use table locks at all !! Only with mysqldump.
Regards,
Sinisa
+----------------------------------------------------------------------+ | TcX ____ __ _____ _____ ___ == mys...@tcx.se | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sin...@mysql.com | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +----------------------------------------------------------------------+
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.




