Re: How do I use 2 DB at once?
Posted in 1996
Joel Schumacher wrote: > > I'm using Online 7.x with 6.x tools. > > Database AAA exists on machine alpha. Database BBB exists on machine beta. > > My application runs on machine alpha and has database AAA open. It needs > to get data from database BBB on machine beta, without closing the database. > snip > I'm trying to look at statements like CONNECT, SET CONNECTION, > DISCONNECT, etc. Has anybody looked at these? Can you give me some tips > on how to use them? >snip Joel, I am reading "Informix Guide to SQL, Syntax Version 6.0". It may or may not be the most up to date, but it works Ok for me. Anyhow, on pages 1-44 through 1-54, this manual describes the CONNECT statement. It goes into gory detail on the CONNECT ... WITH CONCURRENT TRANSACTION uses. It points out that Informix does not support "global" transactions. However, I am sure that you could code such a thing correctly with a little logic in C. This concurrent transaction lets you switch between database connections without dropping a transaction that you are already in. It seems pretty handy for addressing your question. I tried it out some months ago and it works. ( Informix 7.10.UC1 ) I have NOT tried to go to 2 different machines. Give it a try and let me know if it works. I hope this helps, Kevin -- +------------------------------+-------------------------+----------------+ | Kevin McHugh - SW Engineer | mkmchu@fax.cs.mci.com | | MCI Telecommunications Corp. | (719) 535-5278 | +------------------------------+-------------------------+----------------+ | ALL RIGHTS RESERVED. | | This posting is copyright and may be used only for the purposes | | of professional study. Use of this posting in any commercial | | environment is explicitly prohibited. This posting may only be | | reproduced for personal archival purposes. | +-------------------------------------------------------------------------+