472,952 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 software developers and data experts.

What is the API to call terminate

I have an application, where I do connect, handle a few requests, and
if for some reason, I lose connectivity, I detect that and loop(trying
to reconnect) until I regain connection to the DB. My problem is that
after I do a

EXEC SQL CONNECT.....<>;
and after I detect the problem with connectivity...I do this

EXEC SQL CONNECT RESET;
EXEC SQL TERMINATE;

The problem is, when I compile/link I get an error that says, that
"terminate" is an unrecognised token, anyone know what I can use
instead of 'EXEC SQL TERMINATE;' to get the same results I want?

Thanks, Draw

Oct 15 '06 #1
2 1726
Draw wrote:
I have an application, where I do connect, handle a few requests, and
if for some reason, I lose connectivity, I detect that and loop(trying
to reconnect) until I regain connection to the DB. My problem is that
after I do a

EXEC SQL CONNECT.....<>;
and after I detect the problem with connectivity...I do this

EXEC SQL CONNECT RESET;
EXEC SQL TERMINATE;

The problem is, when I compile/link I get an error that says, that
"terminate" is an unrecognised token, anyone know what I can use
instead of 'EXEC SQL TERMINATE;' to get the same results I want?

Thanks, Draw
>>Just one more thing, I am using C++ for this development effort. In case that matters.
Oct 15 '06 #2
Draw wrote:
I have an application, where I do connect, handle a few requests, and
if for some reason, I lose connectivity, I detect that and loop(trying
to reconnect) until I regain connection to the DB. My problem is that
after I do a

EXEC SQL CONNECT.....<>;
and after I detect the problem with connectivity...I do this

EXEC SQL CONNECT RESET;
EXEC SQL TERMINATE;

The problem is, when I compile/link I get an error that says, that
"terminate" is an unrecognised token, anyone know what I can use
instead of 'EXEC SQL TERMINATE;' to get the same results I want?
CONNECT RESET is all you need. It disconnects from the database.

p.s: TERMINATE is a DB2 command and not a SQL statement.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tatiana Zadiraka | last post by:
I use DB2 8.1 with FixPack 5. In command line for sql I get all DATE columns only in MM-DD-YYYY format. Of course, DATE('20-12-2003') gives me an error SQL0181N The string representation of a...
3
by: Robert A Riedel | last post by:
I am having a difficult time solving a memory leak in a DLL. The problem occurs because I cannot find a way to control the termination of threads managed by the DLL. In a thread procedure that...
3
by: Keith Grefski | last post by:
I cant seem to figure out how to terminate a process in vb.net i can do it using vbscript and wmi but terminate doesnt seem to exist in the available classes for wmi under vb.net
5
by: Antonio Parolini | last post by:
What is the difference between: main(......) { exit(0); } and main(......) {
10
by: Digital Puer | last post by:
Sorry for the rudimentary question. I found the following posting online and did not know the answer myself. "Reminds me of a time I had a phone interview concerning a C++ job. Didn't help...
1
by: thunder54007 | last post by:
hi, here is my script: import win32con import time import wmi c = wmi.WMI() for process in c.Win32_Process(name = "notepad.exe"): print process.ProcessId, process.Name process.Terminate ()
5
by: cnsabar | last post by:
Hi., I want to call some function when the user force to terminate the perl program. For example., I write a program to create a file when the program starts... Also I need to delete a file...
69
by: Yee.Chuang | last post by:
When I began to learn C, My teacher told me that pointer is the most difficult part of C, it makes me afraid of it. After finishing C program class, I found that all the code I wrote in C contains...
66
by: John | last post by:
Hi What are the advantages actually achieved of managed code? I am not talking of theory but in reality. Thanks Regards
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.