By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,232 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,232 IT Pros & Developers. It's quick & easy.

What is the API to call terminate

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.