 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Vander Guest
|
Posted: Fri Aug 20, 2004 2:30 pm Post subject: How to stop a query? |
|
|
Hi all
Win98, Delphi5, Interbase/Firebird, Zeos components
I'd like to know if there is a way to stop an executing query.
For example: I could show a modal form with a "Cancel" button, then start
the query. If the user want to stop it, just press the button.
Is it possible to do it using a second thread? How to implement?
Thank you
Vander
|
|
| Back to top |
|
 |
Martijn Tonies Guest
|
Posted: Fri Aug 20, 2004 3:21 pm Post subject: Re: How to stop a query? |
|
|
Hi,
| Quote: | Win98, Delphi5, Interbase/Firebird, Zeos components
I'd like to know if there is a way to stop an executing query.
For example: I could show a modal form with a "Cancel" button, then start
the query. If the user want to stop it, just press the button.
Is it possible to do it using a second thread? How to implement?
|
InterBase 6.5 and up has a query-cancel API. This works
very well.
Firebird doesn't have this.
I don't know if Zeos exposes this functionality.
--
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
|
|
| Back to top |
|
 |
Vander Guest
|
Posted: Fri Aug 20, 2004 4:09 pm Post subject: Re: How to stop a query? |
|
|
Thanks Martijn...
Vander
| Quote: |
InterBase 6.5 and up has a query-cancel API. This works
very well.
Firebird doesn't have this.
I don't know if Zeos exposes this functionality.
--
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
http://www.upscene.com
|
|
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Fri Aug 20, 2004 5:09 pm Post subject: Re: How to stop a query? |
|
|
Martijn Tonies wrote:
| Quote: | I don't know if Zeos exposes this functionality.
|
As long as you can get a statement handle, you can just call
isc_dsql_free_statement without needing it wrapped by your query
components.
Also, note that there are two parts to cancelling SELECTs. During
execution, you need to use isc_dsql_free_statement. But during
fetching result sets you just have to stop fetching.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html
|
|
| Back to top |
|
 |
Vander Guest
|
Posted: Fri Aug 20, 2004 6:30 pm Post subject: Re: How to stop a query? |
|
|
That's the point:
How can I get a statement handle?
If the program call a query (a SELECT for example) it wait for the query
results and we can't call any statement!
Is there a way?
Vander
"Craig Stuntz [TeamB]" <cstuntz (AT) nospam (DOT) please [a.k.a. vertexsoftware.com]>
escreveu na mensagem news:41263055$2 (AT) newsgroups (DOT) borland.com...
| Quote: |
Martijn Tonies wrote:
I don't know if Zeos exposes this functionality.
As long as you can get a statement handle, you can just call
isc_dsql_free_statement without needing it wrapped by your query
components.
Also, note that there are two parts to cancelling SELECTs. During
execution, you need to use isc_dsql_free_statement. But during
fetching result sets you just have to stop fetching.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html
|
|
|
| Back to top |
|
 |
Vander Guest
|
Posted: Fri Aug 20, 2004 6:33 pm Post subject: Re: How to stop a query? |
|
|
Hi
| Quote: |
As long as you can get a statement handle, you can just call
isc_dsql_free_statement without needing it wrapped by your query
components.
|
Is there a way to get a statement handle in this case?
Thanks
Vander
|
|
| Back to top |
|
 |
Martijn Tonies Guest
|
Posted: Fri Aug 20, 2004 6:37 pm Post subject: Re: How to stop a query? |
|
|
| Quote: | As long as you can get a statement handle, you can just call
isc_dsql_free_statement without needing it wrapped by your query
components.
Is there a way to get a statement handle in this case?
|
That depends on the Zeos library - you need to get the
native InterBase handle for the statement.
--
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
|
|
| Back to top |
|
 |
Vander Guest
|
Posted: Fri Aug 20, 2004 6:46 pm Post subject: Re: How to stop a query? |
|
|
Sorry my mistake, the message was sent twice.
"Vander" <vander (AT) pucrs (DOT) br> escreveu na mensagem
news:41264379$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
Hi
As long as you can get a statement handle, you can just call
isc_dsql_free_statement without needing it wrapped by your query
components.
Is there a way to get a statement handle in this case?
Thanks
Vander
Also, note that there are two parts to cancelling SELECTs. During
execution, you need to use isc_dsql_free_statement. But during
fetching result sets you just have to stop fetching.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|