[Mono-list] ODBC & Mono 2.0? Mine broke.
Gert Driesen
gert.driesen at telenet.be
Tue Oct 21 16:44:22 EDT 2008
Hey Timo,
Are you using Mono on Windows or Linux? I can reproduce it on Windows, but
not on Linux.
I have attached a patch that fixes the issue for me on Windows, but I don't
want to risk breaking ODBC support on Unix (any further).
Can you test the patch?
Gert
-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of timo_p
Sent: dinsdag 21 oktober 2008 15:12
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] ODBC & Mono 2.0? Mine broke.
Hello,
we also found several problems with Mono 2.0 and ODBC.
I am a bit surprised that the release notes of 2.0 don't mention anything
about the work that has obviously been done in System.Data between April
2008 (release of Mono 1.9.1) and October 2008 (Mono 2.0). The subversion log
shows a lot of changes.
Can the Mono team please let us know if they expect any problems with it?
I have a problem e.g. with the constructor
public OdbcParameter(string name,Object value)
with a string parameter.
It worked before like this, and still does in Microsoft .net 2.0:
parameters[0] = new OdbcParameter("partnershortname",
(System.Object)"Pok%");
But now with mono 2.0 we get this exception:
System.Data.Odbc.OdbcException: ERROR [22001] [DataDirect][ODBC PROGRESS
driver]String data, right truncated. Error in parameter 1.
The workaround is:
parameters[0] = new OdbcParameter("partnershortname",
OdbcType.VarChar, 20);
parameters[0].Value = (System.Object)"Pok%";
My colleague will file a bug report in Bugzilla for this, and there are
other bugs as well that I have not fully analysed yet.
My question is:
What are the changes to System.Data, and is there still work going on in
that area?
Thanks,
Timo
Adam Tauno Williams-2 wrote:
>
> Has anyone tried the ODBC provider in Mono 2.0? I updated my
> workstation to 2.0-15 (i586) and my database connections now fail with
> the rather mangled looking:
>
> ERROR [I000] [unixODBC][
> at System.Data.Odbc.OdbcConnection.Open () [0x00000]
> Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [I
>
> whereas the same code still works perfectly on my server, which is Mono
> 1.2.6-4.
>
> Make the same connection sing the isql CLI utility provided by unixODBC
> works. Both machines are openSUSE 32-bit. The driver the Informix ODBC
> driver managed through unixODBC.
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
--
View this message in context:
http://www.nabble.com/ODBC---Mono-2.0---Mine-broke.-tp19884966p20089997.html
Sent from the Mono - General mailing list archive at Nabble.com.
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odbcparam.patch
Type: application/octet-stream
Size: 1000 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20081021/1fce92fb/attachment.obj
More information about the Mono-list
mailing list