Prev: wxDynamicLibrary help!
Next: *.Add problem
From: "Udo Baumgart" on 11 Dec 2006 06:36 Hi, i tried to compile the odbc sample. It is NOT working under Windows XP. I am using wxWidgets 2.6.3 with Code::Blocks 1.0 RC 2 with the MinGW. I tried the ODBC sample code from the manual too: It doesn't work! wxwidgets: --------------------------------------------------------------- DbConnectInf = new wxDbConnectInf(NULL, wxT("VALID ODBC DNS"), wxT("VALID DATABASE USER"), wxT("VALID PASSWORD")); // Error checking.... if (!DbConnectInf || !DbConnectInf->GetHenv()) { return HandleError(wxT("DB ENV ERROR: Cannot allocate ODBC env handle")); } db = wxDbGetConnection(DbConnectInf); if (!db) { return HandleError(wxT("CONNECTION ERROR - Cannot get DB connection")); } ------------------------------------------------------------------- This fails (wxDbGetConnection always returns NULL). If i try to open the database with the following code (instead of wxDbGetConnection), everything works fine: --------------------------------------------------------- db = new wxDb(DbConnectInf->GetHenv(),false); bool open = db->Open(wxT("VALID ODBC DNS"),wxT("VALID DATABASE USER"),wxT("VALID PASSWORD"),false); ----------------------------------------------------- Strange, isn't it? Is there a change between older versions of wxWidgets and 2.6.3? Or is there an error in the odbc part of wxWidgets? Ciao, Udo P.S.: I am using MySQL 5.0.23, myODBC 3.51 and an unicode build of wxWidgets 2.6.3 --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
|
Pages: 1 Prev: wxDynamicLibrary help! Next: *.Add problem |