469,955 Members | 1,454 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

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 1620
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert A Riedel | last post: by
3 posts views Thread by Keith Grefski | last post: by
5 posts views Thread by Antonio Parolini | last post: by
10 posts views Thread by Digital Puer | last post: by
1 post views Thread by thunder54007 | last post: by
69 posts views Thread by Yee.Chuang | last post: by
66 posts views Thread by John | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.