Hi.
First of all, as I said before, connection with correct parameter values works fine.
And now, my new issue.
Take the following VC++ code:
TRY
{
if (pDB->OpenEx("DSN=mydsn;Database=mydb;"))
// go on with execution ...
else
// prompt the user with some dialog
}
CATCH(CDBException, e)
{
e->ReportError();
// prompt the user with some dialog
}
END_CATCH
The problem: if I define an invalid server address in mydsn, OpenEx fails causing the DSN configuration dialog to show prompting the user for correct parameter values - an that's fine because I did not specify the CDatabase::noOdbcDialog flag.
But... if I don't change any value and simply click the Ok button, I get a msgbox form VC++ stating: "User breakpoint called ffrom code at 0x77f65554" and the follwing is written to the debug panel:
"HEAP[MyApp.exe]: Invalid Address specified to RtlFreeHeap( 00AF0000, 00AF40B8 )"
all before it gets to the "e->ReportError();" instruction.
Changing to CATCH_ALL(e) made no difference.
Changing to using CDatabase::noOdbcDialog did not prompt the DSN dialog and went to the "e->ReportError();" instruction with no exceptions in between, which is just fine.
I think the uncatchable exception should not happen and probably the best behaviour would be to prompt again until the user supplies working parameter values or hits the cancel button.
I'd like to hear oppinions on this matter. Thanks.
Fernando Cristóvão
Software Developer
Portugal
-----------------------------------
Chegou o Clix Turbo ADSL a 8 Megas
Internet + Telefone sem assinatura telefónica
Saiba mais em http://adsl.clix.pt
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc [at] m.gmane.org
