× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 11/16/2017 03:58:57
PM:
I have a program (that I do not have source for) that is connecting to a
remote database to retrieve some data from it. When control is returned
to
my RPGLE program and I try to insert into the database on the current
machine, it fails because (assuming) it is still connected to the remote
database. What is the correct way to disconnect from the remote
database
(remote database / machine can vary so I don't know the specific name of
it)
and reconnect to my local database so that I can insert into the local
database?

I have found that the following works for me when I'm completely
done with the remote database.

exec sql commit; // complete the commitment process
exec sql release rmtdb; // release the database
exec sql disconnect rmtdb; // release the connection
exec sql connect reset; // reset to local database

On the flip side, you can switch back and forth between remote and
local databases -- but you have to know the name of the local database.

exec sql set connection dbname;

Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.