2009/3/26 Torsten Schulz <[email protected]>:
> Ok, I'll try to:
> My Application has the following lines:
>
> if (!connection->connect(dbname.c_str(), server.c_str(), dbuser.c_str(),
> dbpw.c_str())) {
>
> // Error-Handling
>
> errorMessage = connection->error();
>
> }
>
> If the database are able to connect, all is fine. But if anything wrong
> (like the password), I'll show an error-message in the browser. But it isn'
> possible. In the if (!...) line, the Application aren't continued with, on
> the browser I see only a white screen, and in application output I see only
> the message
In HangmanDb.C, you'll see that every call to mysql++ functions are
wrapped in try/catch blocks. Try the same:
try {
connection->connect(dbname.c_str(), server.c_str(), dbuser.c_str(),
dbpw.c_str());
} catch (Exception &e) {
// Error-Handling
errorMessage = connection->error();
}
Or, see if you can configure mysql++ to return error values instead of
throwing exceptions.
Regards,
Wim.
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest