Solved

ADO- complete Delphi example

Posted on 2012-12-24
8
769 Views
Last Modified: 2012-12-26
Hello experts,

Problem desc:

- remote Firebird 1.5 server
- 'select * from TABLE'
- 78.567.678.12
- sysdba
- masterkeyxxx
- C:\Database.gdb
- query I am able to cancel at any given time

Question:
How can I do it (using ADO probably) i.e.

TADOConnection
TADODataset (maybe other components)

Thank you!
0
Comment
Question by:panJames
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 38718303
can u be more clear as for what do you wish to see in the example?
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 38718357
the query will continue to run on the server, regardless of the client giving up on it, you need at least firebird 2.1 to be able to abort queries
0
 

Author Comment

by:panJames
ID: 38718438
@sedgwick:

I would like to know exactly how to use ADO components to connect to a distant server, run a query but do not necessary wait until it completes- be able to abort the query on client side and/or server side.

@NickUpson:
If possible, could you please point out how to abort query on the client side and on the server side?

My database running on 1.5 but I guess it will be also well working on 2.1 <- am I correct here?

Thank you!
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 38718445
Why dont you just call TADOConnection .Cancel
Assuming your query is running in some kind of thread and you have the opportunity to call the cancel method
0
 
LVL 19

Accepted Solution

by:
NickUpson earned 167 total points
ID: 38718469
1.5 does not have a mechanism to stop a query running on the server

2.1 requires you to delete the correct record from rdb$transactions
0
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 167 total points
ID: 38718477
0
 

Author Comment

by:panJames
ID: 38720180
Ok, I am giving up the idea of canceling running query on the server side.
Is there any clever way of canceling query on the client side?

Thank you!
0
 
LVL 21

Assisted Solution

by:developmentguru
developmentguru earned 166 total points
ID: 38721418
When I need the ability to do this I run the query in a thread.  If I decide to stop waiting on the thread then the program continues as though the query were cancelled.  When the query finished then the thread would free itself, and the database resources.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
T-SQL Query - Group By Year 3 54
error starting form builder in 11g 2 47
SQL SERVER 2008 R2 Problem copying database 10 66
How do I search for a text string in my SQL code 18 47
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question