[Mono-list] Odbc connection via UnixODBC

Sébastien Robitaille sebastien.robitaille@croesus.com
Wed, 23 Jun 2004 11:06:46 -0400


Hi,

I had this problem a few weeks ago. A quick workaround is to create a symbolic link in your unixODBC lib installation directory
(usually /usr/local/lib):

ln -s libodbc.so odbc32.so

Sébas

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com]On Behalf Of
beniniva@csr.unibo.it
Sent: Wednesday, June 23, 2004 10:55 AM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Odbc connection via UnixODBC



I've an odbc connection test, named Test.cs,connecting to MySQL database with a
connection string  that works correctly on Windows XP using Visual Studio.Net
2003, but not on Linux (FedoraCore2) with Mono (1 Beta) via unixODBC.

################
[root@or2 Desktop]# mcs Test.cs -r System.Data.dll
Compilation succeeded
[root@or2 Desktop]# mono Test.exe

Unhandled Exception: System.DllNotFoundException: odbc32
in <0x00053> (wrapper managed-to-native) System.Data.Odbc.libodbc:SQLAllocHandle
(System.Data.Odbc.OdbcHandleType,intptr,intptr&)
in <0x0003f> System.Data.Odbc.OdbcConnection:.ctor ()
in <0x0000a> System.Data.Odbc.OdbcConnection:.ctor (string)
in <0x00056> (wrapper remoting-invoke-with-check)
System.Data.Odbc.OdbcConnection:.ctor (string)
in <0x0002d> Prova.Class1:Main (string[])

################

Could anybody help me?

Thanks in advance,

Valentina.
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list