Re: Powerbuilder and multiple databases?
Date: 27 Jan 1994 09:30:12 -0500
Message-ID: <2i8j5k$2rl_at_news.delphi.com>
In PB, sure it can be done. You need two (or more) transaction objects -- one of which might be the built-in SQLCA; the other of which you create explicitly, as follows:
transaction mytrans // Declare "mytrans" as a var of the "transaction" DType
mytrans = create transaction // Instantiate the "mytrans" object
mytrans.DBMS = "sybase"
mytrans.logid = "me"
etc.
connect using mytrans;
DataWindow1.SetTransObject (mytrans)
etc.
This gives you an app that accesses and updates both databases simultaneously. Note that it doesn't give you a 2-phase commit. Also, note that some database vendors themselves have facilities for accessing "foreign" DBMSs through their engine. I know of customers using Oracle who have built PB applications that select data from Oracle and DB2 in the same SELECT statement (using Oracle's DB2 connection).
Hope this helps,
-Samuel Coe
COES_at_DELPHI.COM
Received on Thu Jan 27 1994 - 15:30:12 CET