Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Problems with OCIDatabase
Problems with OCIDatabase
Posted: 2001/03/04 07:04
 
I'm trying to make a MDI application, where every child window has a different connection to Oracle Databases. So I put an OCIDatase component in the Child window.
However, it seems that only the first connection is used (the one in the first child window).
I tryed to do SELECT * FROM USER_USERS and the information returned is always about the firts connection. I guess it's because all the OCIDatabases components in every Child window will have the same name. How can I solve this ? Any suggestions ?

Thanks,

Heitor.
RE: Problems with OCIDatabase
Posted: 2001/03/04 20:37
 
Hello !

Yes, NCOCI8 components are linked to TOCIDatabase by it name. But DatabaseName may contain special template characters. That will allow to expand name in some unique way. In your case, use '%O' inside of name. %O will be substitued with component Owner id (TOCIDatabase.Owner or TOCIDataSet.Owner). For example:

OCIDatabase1.DatabaseName := 'MYDB_%O';
OCIQuery1.DatabaseName := 'MYDB_%O';
RE: Problems with OCIDatabase
Posted: 2001/03/23 02:24
 
I tryed your example, but it didn't work. Maybe I did something wrong. Can you post/send me some more complete example ? And thank you for the quick response.

Heitor
RE: Problems with OCIDatabase
Posted: 2001/03/23 02:31
 
I tryed the examples, but they didn't work. The component complains about wrong database name. Do you have a more detailed example ?

Heitor.