[Mono-list] about quoted 2byte-characters in System.Data.Odbc.OdbcCommand

xsloader xsloader at xs.guild.gs
Sun Feb 8 02:54:15 EST 2009


I'm writing a data converter using ODBC.
Following is a part of my code:

using System.Data.Odbc;
OdbcConnection connection=new OdbcConnection("Driver={Microsoft Access
Driver (*.mdb)};DBQ=a.mdb");
connection.Open();
reader=new OdbcCommand("select * from \"あ\"",connection).ExecuteReader();
reader.Read();

Creation of reader fails on Mono 2.0, but OK in 1.9.1.
To analyze the problem, I modified the source code of libmdbodbc.so to show
the query string.
On 1.9.1, it showed:
select * from "あ"
but on 2.0, it showed:
select * from "'-?"
These two strings are completely different.
So I tried to use old version to determine what change had caused this
difference.
Firstly I used System.Data.dll in the eariest snap shot
http://mono.ximian.com/daily/monocharge-20080615.tar.gz, but it showed
select * from "'-?".
Nextly I tried to compile more early version using SVN, but an error has
occurred.
---
root at xxxxxx:/work/misc/lib/mono/mcs/class/System.Data# make NO_DIR_CHECK=1
MONO_VERSION=2.0 FRAMEWORK_VERSION=2.0 EXTERNAL_MCS=/usr/bin/mcs
EXTERNAL_RUNTIME=/usr/lib/mono
...
make[4]: Entering directory `/work/misc/lib/mono/mcs/mcs'
MONO_PATH="../class/lib/basic:$MONO_PATH" false  ../class/lib/basic/mcs.exe
/codepage:65001 -d:GMCS_SOURCE  -d:NET_1_1 -d:ONLY_1_1 -debug -target:exe
-out:gmcs.exe cs-parser.cs  @gmcs.exe.sources
make[4]: *** [../class/lib/net_1_1_bootstrap/gmcs.exe] Error 1
...
---
So I could not build old source.
Therefore I could not determine the difference nor fix it. In this case I
won't be able to update System.Data.dll from 1.9.1 even though other modules
are upgraded.
Any help is welcomed.

-- 
View this message in context: http://www.nabble.com/about-quoted-2byte-characters-in-System.Data.Odbc.OdbcCommand-tp21896672p21896672.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list