DatabaseLayer ODBC problem with UNICODE Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
vtararin
Knows some wx things
Knows some wx things
Posts: 37
Joined: Thu May 24, 2007 4:43 pm
Location: Ukraine
Contact:

DatabaseLayer ODBC problem with UNICODE

Post by vtararin »

I have a problem with unicode support for MSSqlServer and DatabseLayer(ODBC) in unicode build.

When unicode string posted via Parameter of a PreparedStatement. It stores in the datadase as real two bytes per character string. I tried varchar and nvarchar types for columns, the result is the same.

In the application characters shown correctly, but collation and database functions do not work properly.

But when I include param directrly in statement all works properly.

----
wxWidgets 2.8.6, DatabaseLayer(CVS head), MSSqlServer 2000, Visual Studio 2003.
Debug, UNICODE build.
Thank you.
Attachments
How it looks in the database.
How it looks in the database.
vtararin
Knows some wx things
Knows some wx things
Posts: 37
Joined: Thu May 24, 2007 4:43 pm
Location: Ukraine
Contact:

Post by vtararin »

I fixed this problem. Solution properly works for MSSQLServer ODBC driver. But may not works if you will use non unicode driver in unicode application.
Looking on this problem I did not post changes as a patch.
If any body will need this solution, let me know I will sent path to anybody.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

Be aware that GTK port can't compile wxODBC in UNICODE mode and there is no more wxODBC in trunk (2.9/3.0) versions.

Thank you.
vtararin
Knows some wx things
Knows some wx things
Posts: 37
Joined: Thu May 24, 2007 4:43 pm
Location: Ukraine
Contact:

Post by vtararin »

This topic is not about wxODBC, it about DatabaseLayer's ODBC driver.
Post Reply