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 » Sat Dec 08, 2007 3:38 pm

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
screen.JPG
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 » Mon Dec 17, 2007 7:44 am

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: 4366
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Mon Mar 31, 2008 6:52 pm

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 » Tue Apr 01, 2008 6:18 am

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

Post Reply