Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Reconnecting
Reconnecting
Posted: 2007/07/09 08:39
 
I have something like that:

try{
OCIDatabase->ConnectString = "a/aa@aaa";
OCIDatabase->Open();
}catch(Exception &exp){
OCIDatabase->ConnectString = "b/bb@bbb";
OCIDatabase->Open();
}

The problem is, when I'm executing thic code and connect string "a/aa@aaa" is wrong, during opening connection to database (b/bb@bbb) my app is sudennly exiting.

How can I do reconnect to database when 1st attemt failed (or after connection lost)?
I can't change ncoci8 to AnyDAC....

Art
Re:Reconnecting
Posted: 2007/07/09 09:06
 
Hello

Sorry, I am not supporting NCOCI8 without precise testcases. If you will investigate and found an issue, then I will provide a solution.

Regards,
Dmitry
Re:Reconnecting
Posted: 2007/07/09 23:41
 
Can't you give us any simple (just a few lines of code) sample how to implement a reconnect after connection lost (or when the 1st attemt failed (wrong user/pass etc.))?
It's a very important for my client and I can't use AnyDAC (I can't change components in my support contract).
I think the key to bug fix is reseting state of ocidatabase...

Art
Re:Reconnecting
Posted: 2007/07/26 08:24
 
...
OCIDatabase1->Open();
OCIDatabase1->Connected = false;
OCIDatabase1->Open();
...


After 2nd open() my app disappear....