[Mono-devel-list] Exception using ASP.NET (XSP) and OleDb cla ss
Gomez Aragoneses, Andres
agomez at wke.es
Wed Sep 15 06:44:46 EDT 2004
Hello.
My third try has been ODBC and I again didn't success.
My error now is from the compiler: "error CS0006: Cannot find assembly
`System.Data.Odbc'".
My config file seems correct:
<configuration>
<dllmap dll="cygwin1.dll" target="libc.so.6" />
<dllmap dll="libc" target="libc.so.6" />
<dllmap dll="libintl" target="libc.so.6" />
<dllmap dll="libxslt.dll" target="libxslt.so" />
<dllmap dll="libmySQL.dll" target="libmysqlclient.so" />
<dllmap dll="odbc32.dll" target="libodbc.so" />
<dllmap dll="oci" target="clntsh" />
<dllmap dll="db2cli" target="libdb2_36.so"/>
</configuration>
Of course, I am "using System.Data.Odbc" and calling the compiler with
"-r:System.Data.Odbc". And there are no more instructions to get it working
in http://www.go-mono.com/odbc.html .
Can I really use Mono to develop, on Windows, a program that access to a
(Oracle)DB? :o
Regards,
knocte
-----Mensaje original-----
De: Simon Bain [mailto:sibain at tendotzero.com]
Enviado el: miércoles, 15 de septiembre de 2004 11:40
Para: Gomez Aragoneses, Andres
Asunto: RE: [Mono-devel-list] Exception using ASP.NET (XSP) and OleDb class
Hi.
I have also looked and cannot see a gda reference on my win box, so I would
assume that this is as yet unavailale. However do not assume that all
references are placed in to the config.
I found that I had to add an additional odbc32 to the config. odbc was
present but the mapping required odbc32 to also be added.
All the best
Simon
--
Simon Bain
TENdotZERO
----------
XML Open Conference Speaker:- Data Integration with XML and Mono
http://www.xmlopen.org
----------
XML 2004 Conference Speaker:- e-Voting
http://www.xmlconference.org/xmlusa/
> Thanks for your comments.
>
> I haven't found any file with the letters "gda" on my Mono directory, so I
> believe the lib is not available (yet?). And if it existed there, why
> wouldn't Mono installation set it by default on the config file? Is this
> going to be implemented in the future? Should we submit a bug (RFE) report
> about this?
>
> I am going to test now the access with ODBC, as you recommend. I will tell
> you when I have the results.
>
> Regards,
>
> Andrew
>
>
> -----Mensaje original-----
> De: Simon Bain [mailto:sibain at tendotzero.com]
> Enviado el: martes, 14 de septiembre de 2004 18:15
> Para: Gomez Aragoneses, Andres
> CC: mono-devel-list at lists.ximian.com
> Asunto: Re: [Mono-devel-list] Exception using ASP.NET (XSP) and OleDb
> class
>
>
>
> Hi.
>
> A partial help (sorry not the full).
> The message is often due to a dll mapping not being found. If you look in
> the mono config file
> Mono Install Directory/etc/mono/config
> you will see it there. What you will need to do is map the required dll to
> the linux file. Eg for odbc connections you would normally have to add a
> line in the config file like
>
>
>
> In this instance you may need (only may) something like
>
> You will need to get teh correct mapping for the windows file version.
>
> I hope thsi helps, even if only a little.
>
> Failing that you could try an ODBC connection, which you will need to have
> unixODBC installed. I have used it with great success and speed across a
> range of different databases. It may seem like a backward step from OleDb
> but it does still work well, and there are a lot of drivers available.
>
> In case you have not used it here is a connection example.
> public string callQuery(string strConnection, string strSQL)
> {
> string strReturn = " > "\">\n";
> OdbcConnection dbcon = new OdbcConnection(strConnection);
> try
> {
> stringFunctions strClass = new stringFunctions();
> dbcon.Open();
> OdbcCommand dbcmd = new OdbcCommand(strSQL,dbcon);
> OdbcDataReader sqlreader = dbcmd.ExecuteReader();
> while (sqlreader.Read()){
> //Do something
> }
> //Carry on
> Again I hope that this helps.
>
> All the best
> Simon
> --
> Simon Bain
> TENdotZERO
> ----------
> XML Open Conference Speaker:- Data Integration with XML and Mono
> http://www.xmlopen.org
> ----------
> XML 2004 Conference Speaker:- e-Voting
> http://www.xmlconference.org/xmlusa/
>
>> Hello guys.
>>
>> I am developing an ASP.NET application and I have problems connecting to
>> the
>> database. No compilation errors but I catch this exception:
>>
>> System.DllNotFoundException: gda-2 in <0x00050> (wrapper
>> managed-to-native)
>> System.Data.OleDb.libgda:gda_init (string,string,int,string[]) in
>> <0x0003e>
>> System.Data.OleDb.OleDbConnection:.ctor () in <0x0000a>
>> System.Data.OleDb.OleDbConnection:.ctor (string) in <0x00053> (wrapper
>> remoting-invoke-with-check) System.Data.OleDb.OleDbConnection:.ctor
>> (string)
>> in <0x00065> ConexionDB:prueba ()
>>
>> My block of code is:
>>
>>
>> public class ConexionDB {
>>
>> const string sCon = "DSN=cronos_geac_oracle;PASSWORD=xxxxx;UID=user;";
>>
>> public string prueba () {
>>
>> OleDbConnection oCon;
>>
>> try {
>> oCon = new OleDbConnection(this.sCon);
>> }
>> catch (Exception e) {
>> return e+"";
>> }
>>
>> }
>> }
>>
>> The thing is that I have already found one person that has had my
>> problem,
>
>> but it seems no one replied his message (thread formed by only one
>> message):
>>
>> http://www.mail-archive.com/mono-list@lists.ximian.com/msg09588.html
>>
>> The unique difference, I think, is that I am on Windows XP and he is on
>> Linux. Version of Mono: 1.0.1.
>>
>> Anyone could comment anything about this? Thanks very much in advance.
>>
>> --
>> Regards,
>>
>> Andrew
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>
>
>
More information about the Mono-devel-list
mailing list