Re: How do I use 2 DB at once?
Posted in 1996
Hi Joel,
When I replied to your mail I got it bounced back..so I'll post to the list.
My suggestion to read data from both databases would be to try using
synonyms.
}From withing database AAA create a synonym
CREATE SYNONYM bbb_anytable FOR bbb@beta_engine_name:anytable;
then you can just select * from bbb_anytable and use it in your 4gl like a
regular table. Thats how I would do it anyway...I'm not a DBA so I'm not sure
what has to done to allow both databases to "see" each other you would have
to ask one of them.
Have fun
sandys
On Jun 6, 9:46pm, Joel Schumacher wrote:
} Subject: How do I use 2 DB at once?
} 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.
}
} The DBPATH lets me open either database from alpha. But, when I try to do
} a statement in the form "SELECT * FROM bbb:anytable", I get the following
} errors:
} 329: Database not found or no system permission.
} 111: ISAM error: no record found.
}
} If I change it to the form " SELECT * FROM bbb@beta_engine_name:anytable",
} it works just fine.
}
} I really dont want to have to use the form database@enginename:tablename.
} enginename varies from site to site. I could store it someplace, but
} that's one more thing (besides changine the global DBPATH variable) that
} needs to be changed if the BBB database's location changes.
}
} So, is this a bug? Shouldn't Informix be able to locate my BBB database
} from my DBPATH when I use the form database:tablename?
}
} 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?
} __________________________________________________________________________
} Joel Schumacher JCPenney Co. - UNIX Network Systems
} jschumac@uns-dv1.jcpenney.com 12700 Park Central Pl
} (214) 591-7543 Dallas TX 75251
}-- End of excerpt from Joel Schumacher