Monet ODBC gives wrong schema information #3337
Date: 2013-08-08 21:49:33 +0200
Last updated: 2013-09-27 13:47:15 +0200
Date: 2013-08-08 21:49:33 +0200
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC)
Accessing MonetDB database (Fedora) via "OLEDB-Provider for ODBC" (Windows7) the application gets wrong column data because of wrong schema information for the columns in the result set.
When querying the table via Excel the output is displayed right, because Excel doesn't care about correct schema information, but requests all column data in WCHAR-Format from ODBC. Therefore the DECIMAL column and the VARCHAR column are obviously both in the right. But this is a implementation of Microsoft knowing that there were many careless implemented ODBC drivers in ealier years.
But any other application depends on correct schema information from the ODBC driver and that seems to be the reason why they get the wrong column data from the MonetDB ODBC driver. You can check it with a simple VB Script on Windows 7.
When accessing data with Visual Basic by using ADO, the "Microsoft OLEB-Provider for ODBC" strongly relies on this and also gets the wrongly coded data. A test script "monetDB.vbs" is attached. Here we can see that the schema information is not as expected by the standard.
Steps to Reproduce:
1.create table voc.customer
MÃ¼ller Ã–sterreich - Polish: oÅ„Å›Å‚Ä…Ä™Ã³ÅºÅ¼ 50
Müller Österreich - Polish: ońśłąęóźż 50,78
A test script "monetDB.vbs" is attached. Executing this with double-click on Windows we can see that the schema information is not as expected by the standard.
"cname" should be given as NVARCHAR in SQL-term, that means Type 202=adVarWChar out of the ODBC driver
I would expect that if the schema information given by the Monet ODBC driver (for Windows) to the application will be corrected, that the described problems are solved.
Date: 2013-08-08 21:52:39 +0200
Created attachment 215
Date: 2013-08-08 22:02:18 +0200
The Testscript should be slightly changed if using another System DSN as "MonetDB" on Windows and other user ("voc") pw ("voc") for my "voc" database.
The output file Schema.txt will be created in folder c:\temp.
Date: 2013-08-26 16:42:24 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=523e5550df9d
Date: 2013-08-27 15:12:01 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ae491bc2025a
Date: 2013-08-27 15:12:03 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a6d834db6449
Date: 2013-08-27 15:20:24 +0200
Most of the issues reported have been fixed.
Date: 2013-08-27 21:31:59 +0200
thanks for your really engaged efforts. I'd like to test your corrections.
Or would you recommend to compile the changed sources by myself? (Today I dont have any experience to do a compile and make with your source distribution).
Kind regards, Dieter
Date: 2013-08-27 22:03:20 +0200
Depending on your platform, I could give you a precompiled version.
Date: 2013-08-27 22:29:44 +0200
I am using the MonetDb ODBC driver on Windows 7 64bit.
Date: 2013-08-28 09:11:26 +0200
(In reply to comment 9)
I'll send a mail off-list with instructions.
Date: 2013-09-06 15:31:28 +0200
Things seem to work.
The text was updated successfully, but these errors were encountered: