473,513 Members | 2,561 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1744
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
6936
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
6390
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
13765
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
1975
by: Antonio Parolini | last post by:
What is the difference between: main(......) { exit(0); } and main(......) {
10
12265
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
2433
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
2731
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
3128
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
3279
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
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.