[Mono-list] ODBC error

Pedro Borges pedro.m.borges@netcabo.pt
Tue, 30 Sep 2003 02:15:11 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C386F8.AD16A660
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello
I have a solution created in VS.NET and i'm trying to port it to Mono in =
linux. The application has ASPX pages and acesses a MySQL DB through =
ODBC.
In windows i use Microsoft.Data.Odbc and in linux i change it =
System.Data.Odbc. It builds fine but when i execute it there is an =
error:

** (xsp.exe:2930): WARNING **: Failed to load library ./libodbc32.so =
(odbc32): ./libodbc32.so: cannot open shared object file: No such file =
or directory

I instaled the rpm "wine-20000213-1.i386.rpm" that has that library so i =
don't see why i have this error.
I have RedHat 9, Mono 0.26 and xsp 0.5.
If i run MySql on another machine i only need odbc drivers and not =
MyOdbc drivers, right? Thats what i have, i've installed unixODBC 2.2.5 =
anda i'm connecting to MySql that is on another machine.
I don't see where the problem is, can anyone help me? Could it be of =
unixODBC ? xsp? or is libodbc32.so badly configured?

Btw, this is the exception that is thrown and apears in the browser:
System.MissingMethodException: A missing method exception has =
occurred.in <0x00042> 06 System.Data.Odbc.libodbc:SQLAllocHandle =
(System.Data.Odbc.OdbcHandleType,intptr,intptr&)in <0x00073> 00 =
System.Data.Odbc.OdbcConnection:.ctor ()in <0x0000a> 00 =
System.Data.Odbc.OdbcConnection:.ctor (string)in <0x00066> 08 =
System.Data.Odbc.OdbcConnection:.ctor (string)in <0x000d0> 00 =
ServidorDadosSpace.ServidorDados:.ctor =
(PropriedadesSpace.Propriedades,XmlSpace.MyXml&,MonitorizacaoSpace.Monito=
rizacao&)in <0x005bf> 00 InterfaceUtilizador.login:Page_Load =
(object,System.EventArgs)in <0x0005a> 01 =
System.MulticastDelegate:invoke_void_object_EventArgs =
(object,System.EventArgs)in <0x00084> 00 System.Web.UI.Control:OnLoad =
(System.EventArgs)in <0x00031> 00 System.Web.UI.Control:LoadRecursive =
()in <0x000be> 00 System.Web.UI.Page:ProcessRequest =
(System.Web.HttpContext)in <0x00191> 00 .ExecuteHandlerState:Execute =
()in <0x0004e> 00 .StateMachine:ExecuteState =
(System.Web.HttpApplication/IStateHandler,bool&)Thanks in advance

Pedro Borges



------=_NextPart_000_003A_01C386F8.AD16A660
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello<?xml:namespace =
prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></DIV>
<DIV class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a solution created =
in=20
VS.</SPAN><?xml:namespace prefix =3D st1 ns =3D=20
"urn:schemas-microsoft-com:office:smarttags" /><st1:stockticker><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">NET</SPAN></st1:stockticker><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"> and i=92m trying to port =
it=20
to&nbsp;Mono in linux. The application has ASPX pages and acesses =
a&nbsp;MySQL=20
DB through ODBC.</SPAN></DIV>
<DIV class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">In windows i use =
Microsoft.Data.Odbc=20
and in linux i change it System.Data.Odbc. It builds fine but when i =
execute it=20
there is an error:</SPAN></DIV>
<DIV class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT face=3DArial=20
size=3D2></FONT></SPAN><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;</DIV>
<DIV>** (xsp.exe:2930): WARNING **: Failed to load library =
./libodbc32.so=20
(odbc32): ./libodbc32.so: cannot open shared object file: No such file =
or=20
directory</DIV>
<DIV>&nbsp;</DIV>
<DIV>I instaled the rpm "wine-20000213-1.i386.rpm" that has that library =
so i=20
don't see why i have this error.</DIV>
<DIV>I have RedHat 9, Mono 0.26 and&nbsp;xsp 0.5.</DIV>
<DIV>If i run MySql on another machine i only need odbc drivers and not =
MyOdbc=20
drivers, right? Thats what i have, i've installed unixODBC 2.2.5 anda =
i'm=20
connecting to MySql that is on another machine.</DIV>
<DIV>I don't see where the problem is, can anyone help me? Could it be =
of=20
unixODBC ? xsp? or is&nbsp;libodbc32.so badly configured?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Btw, this is the exception that is thrown and apears in the =
browser:</DIV>
<DIV><PRE><FONT face=3DArial>System.MissingMethodException: A missing =
method exception has occurred.<BR>in &lt;0x00042&gt; 06 =
System.Data.Odbc.libodbc:SQLAllocHandle =
(System.Data.Odbc.OdbcHandleType,intptr,intptr&amp;)<BR>in =
&lt;0x00073&gt; 00 System.Data.Odbc.OdbcConnection:.ctor ()<BR>in =
&lt;0x0000a&gt; 00 System.Data.Odbc.OdbcConnection:.ctor (string)<BR>in =
&lt;0x00066&gt; 08 System.Data.Odbc.OdbcConnection:.ctor (string)<BR>in =
&lt;0x000d0&gt; 00 ServidorDadosSpace.ServidorDados:.ctor =
(PropriedadesSpace.Propriedades,XmlSpace.MyXml&amp;,MonitorizacaoSpace.Mo=
nitorizacao&amp;)<BR>in &lt;0x005bf&gt; 00 =
InterfaceUtilizador.login:Page_Load (object,System.EventArgs)<BR>in =
&lt;0x0005a&gt; 01 System.MulticastDelegate:invoke_void_object_EventArgs =
(object,System.EventArgs)<BR>in &lt;0x00084&gt; 00 =
System.Web.UI.Control:OnLoad (System.EventArgs)<BR>in &lt;0x00031&gt; 00 =
System.Web.UI.Control:LoadRecursive ()<BR>in &lt;0x000be&gt; 00 =
System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)<BR>in =
&lt;0x00191&gt; 00 .ExecuteHandlerState:Execute ()<BR>in &lt;0x0004e&gt; =
00 .StateMachine:ExecuteState =
(System.Web.HttpApplication/IStateHandler,bool&amp;)</FONT></PRE></DIV><F=
ONT=20
face=3DArial>
<DIV><FONT face=3DArial>Thanks in advance</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Pedro Borges</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><PRE><BR>&nbsp;</PRE></FONT></SPAN></DIV></BODY></HTML>

------=_NextPart_000_003A_01C386F8.AD16A660--