Re: accessing two database one with logging and without
Posted in 1997
jvemo@cyberspace.com (Jon C Vemo) wrote:
:At 05:25 AM 3/18/97 GMT, Nils Myklebust wrote:
:}rcyrus@promarkone.com wrote:
:}
:}:We have databases on Version 5.03 and version 7.22 online. The 5.03
:}:online instances have NO logging ON (previous DBA!!!). The 7.22 instances
:}:have Logging ON.
:}:
:}:DBACCESS and ISQL and the 4GL code does not allow the access of Non
:}:logging and a logging database at the same time.
:}:
:}:Anybody out there with any workarounds? (we can't turn on logging for the
:}:5.x instances!!) We would really appreciate any ideas!!
:}:
:}:robin cyrus
:}:ProMark One
:}:Scottsdale AZ
:}
:}The only thing you can do in 4GL is to use the database statement to
:}connect to one database. Select something into local variable. Then
:}database again to connect to the other and use the data there.
:}Probably not fast.
:
:Actually, don't you have to write the 'connect' functionality in esql/c (or
:some such), since I do not believe current releases for 4GL support the
:'connect' syntax.
No, this is some kind of misunderstanding that I don't know where it
originated. We simply use the database and close database statements.
When I now look at the library code I wrote a long time ago we
actually prepare and execute these statements. I think that's to be
able to handle different database names easily and be able to add
exclusive to the database statement.
This works fine for us on SE 5.x, 7.x and OnLine 7.x
Our databases have so far allways been in the same instance. Whether
it will work as well if they are in different instances (on the same
machine or different ones), I haven't tested yet.
We use these statements to open the correct database at program
startup as well, so all programs can work on any database with the
correct tables in them. Any program can also gain exclusive access to
the database if we so desire, with a simple parameter added.
:}In dbaccess/ISQL you can only unload to file from one and load from
:}file to the other.
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org