databaselayer ODBC "invalid precision value" error Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
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 Feb 03, 2009 9:00 am

jb_coder wrote:Do I need to change my OS to use Russian or Ukrainian or just the data that's saved in the database? I'm assuming that I'll need to compile wxWindows and DatabaseLayer with UNICODE as well.
You need to change representation of Date and Double as Strings in Windows.

Description.
ODBC implementation uses Strings in between. In Russian or Ukrainian locales in double fraction separates by comma and date format dd/mm/yyyy. Some time in different configurations of locales I had: lost double fractions, month instead day and vise/vesa.

Solution
So, I wrote code for normal handling this data types, without strings in between. This checked on Windows XP, UNICODE build against SQLServer 2000, SQLServer 2005, PostgreSQL ODBC, PostgreSQL ODBC UNICODE, SQLAnywhere 12.
cofounder of LogicLand Ltd.
my interest Kamenets-Podolskiy Online

jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder » Mon Feb 16, 2009 12:20 am

Thanks for the OdbcResultSet fix. I've committed it to source control. I had to make some minor changes to handle NULL values consistently with other backends.

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 Feb 16, 2009 8:24 am

Also, there is a bug in string handling in ODBC layer in UNICODE builds.

I will prepare fixes on couple of dais.
cofounder of LogicLand Ltd.
my interest Kamenets-Podolskiy Online

jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder » Sat Mar 21, 2009 6:09 pm

I'm hoping to have another release of DatabaseLayer soon. Do you have anything more code changes that you'd like to include?

Thanks.

philip0425
In need of some credit
In need of some credit
Posts: 7
Joined: Mon Mar 09, 2009 6:55 am

Post by philip0425 » Mon Mar 23, 2009 8:34 am

Hi, I also have problem in ODBC layer in UNICODE builds. In my case, after I ran a delete statement, the program crashed instead of hanged. So I downloaded the latest code in subversion. But I got a Linker error : undefined reference to 'OdbcInterface::Init()'. How can I solve this?

jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder » Mon Mar 23, 2009 10:25 am

I fixed the ODBC UNICODE issues over the last weekend, but haven't had a chance to commit the code. The missing reference to the OdbcInterface class is because I forgot to add the OdbcInterface.cpp into the project files. I'll hopefully get to the library tonight to check the UNICODE fixes and the project files into source control.

jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder » Tue Mar 24, 2009 7:57 am

As of last night the UNICODE fixes for the ODBC backend have been committed. If you have any more problems with the latest code in subversion, please let me know. You will still need to add the OdbcInterface.cpp to the project though. I haven't had a chance to run bakefile on the project to generate the updated project files.

Post Reply