databaselayer ODBC Unicode

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
borr_1
Super wx Problem Solver
Super wx Problem Solver
Posts: 362
Joined: Wed Mar 07, 2007 8:10 am
Location: Russia, Shakhty

databaselayer ODBC Unicode

Postby borr_1 » Wed Oct 27, 2010 4:33 am

I use a db with ODBC and Unicode on the WinXP (build as mingw32-make -f makefile.gcc odbc WX_SHARED=1 WX_MONOLITHIC=1 WX_UNICODE=1 WX_DEBUG=1 ). And then there are problems
1. OdbcDatabaseLayer.cpp can not connect to the DB using a connection string (m_strConnection). To need to fix the function Open () on

Code: Select all

bool OdbcDatabaseLayer::Open( )
...
#ifdef wxUSE_UNICODE
     wxCharBuffer connectionCharBuffer = ConvertToUnicodeStream(m_strConnection);
#else
     void* connectionCharBuffer = (void*)m_strConnection.c_str();
#endif

from

void* connectionCharBuffer = (void*)m_strConnection.c_str();


2 can not read the text of the error in non-English locale, must change

Code: Select all

void OdbcDatabaseLayer::InterpretErrorCodes( long nCode, void* stmth_ptr )
...
SetErrorMessage(ConvertFromUnicodeStream((char*)strBuffer));
    //SetErrorMessage(wxString((wxChar*)strBuffer));


Code: Select all

void OdbcPreparedStatement::InterpretErrorCodes( long nCode, SQLHSTMT stmth_ptr )
...
SetErrorMessage(ConvertFromUnicodeStream((char*)strBuffer));
    //SetErrorMessage(wxString((wxChar*)strBuffer));
WinXP SP3, wx-2.8.10, MinGW-4.4.1, gdb-7.1.2, eclipse

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Postby Auria » Wed Oct 27, 2010 1:38 pm

Hi,

you may have missed this, but wxODBC is no more part of wxWidgets; as of wxWidgets 2.9.x, wxODBC was removed. The reason is that wxODBC was old, unmaintained and buggy. So you might want to spend your time on something else :)
"Keyboard not detected. Press F1 to continue"
-- Windows

borr_1
Super wx Problem Solver
Super wx Problem Solver
Posts: 362
Joined: Wed Mar 07, 2007 8:10 am
Location: Russia, Shakhty

Postby borr_1 » Thu Oct 28, 2010 4:38 am

I'm talking about databaselayer
WinXP SP3, wx-2.8.10, MinGW-4.4.1, gdb-7.1.2, eclipse


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 2 guests