Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages
Started by Vladimir Stefanovic
Sun, 06 Nov 2005 14:38
TADOQuery & Stopping it
Author: Vladimir Stefanovic
Date: Sun, 06 Nov 2005 14:38
Date: Sun, 06 Nov 2005 14:38
27 lines
1623 bytes
1623 bytes
Hi, I want to have a TADOQuery which should be executed from within TEdit::OnChange(), and that's OK. But I also want to somehow stop (abbandon) the pending query when fast typing on keyboard and use only the last one. Can you please suggest me how to accomplish that. Now, the query which executes approximatly about 0.5 sec still hangs the normal keyboard activity, and sometimes produces the SQL exception. I know how to deal with such exeptions, but I'm currious about breaking the pending query and accept only the new one. -- Best regards, Vladimir Stefanovic
Re: TADOQuery & Stopping it
Author: poojo hackma
Date: Thu, 10 Nov 2005 16:24
Date: Thu, 10 Nov 2005 16:24
18 lines
1618 bytes
1618 bytes
A couple of ideas: 1. You could have your 0.5 sec query function return when no results are found (I'm not sure where your exception is being thrown); or if that doesn't work for you... 2. You could add a TTimer that starts anytime a key is pressed in your TEdit box and stops when the Query begins. I'm sure there are other solutions, but these two ideas quickly come to mind. HTH > Now, the query which executes approximatly about > 0.5 sec still hangs the normal keyboard activity, and > sometimes produces the SQL exception.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads