[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    Re: [Mono-dev] System.DllNotFoundException: gda-2 in (wrapper
From:       Daniel Morgan <monodanmorg () yahoo ! com>
Date:       2006-01-27 21:30:42
Message-ID: 20060127213042.47360.qmail () web34015 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Short Answer:
   
  System.Data.OleDb is unmaintained.   There is no support for Access nor Jet \
databases.  
  Long Answer:
   
  No one maintains System.Data.OleDb anymore.
   
  System.Data.OleDb requires requires libgda from the gnome-db project at \
http://www.gnome-db.org/  however it only works on Linux. It does not work on \
Windows. Well, there have been attempts to port it to Win32, but I don't think they \
have been successful.  
  Jet is the database egine used for Microsoft Access databases.   Mono does not \
support Access nor Jet.  Libgda has a provider for MDB Tools which allows you to read \
mdb files.    
  There are some patches to Mono for COM Interop.  So, you could try to get data from \
Jet via this.  But the COM Interop is not mature yet.  You have to search the mailing \
lists for the patches because they have not been committed to our subversion \
repository yet.  
Morten <monouser@mikkelsens.net> wrote:
  Hi.
Hoping to no offend anyone with a newbie-question.
I just installed mono and found some examples that I am trying to get up 
and running, but something very basic stops me.
I am using mono-1.1.13.2 on a Windows2000 machine.
What doesn't work is:



using System;
using System.Data;
using System.Data.OleDb;

namespace HelloWorld {
   class Program {
     private static string dbConPrefix =
       "provider=Microsoft.JET.OLEDB.4.0; data source=C:\accessdb.mdb";

     static void Main(string[] args) {
       string sqlStmt = "SELECT * FROM aTable";
       OleDbDataAdapter da = new OleDbDataAdapter(sqlStmt, dbConPrefix);
       DataSet ds = new DataSet();
       da.Fill(ds, "SomeData");
     }
   }
}



When I compile with just 'mcs HelloWorld.cs', I get:
HelloWorld.cs(2,7): error CS0234: The type or namespace name `Data' does 
not exist in the namespace `System'. Are you missing an a
ssembly reference?
HelloWorld.cs(2,1): error CS0246: The type or namespace name 
`System.Data' could not be found. Are you missing a using directive o
r an assembly reference?
Try using -r:System.Data
HelloWorld.cs(3,7): error CS0234: The type or namespace name `Data' does 
not exist in the namespace `System'. Are you missing an a
ssembly reference?
HelloWorld.cs(3,1): error CS0246: The type or namespace name 
`System.Data.OleDb' could not be found. Are you missing a using direc
tive or an assembly reference?
Compilation failed: 4 error(s), 0 warnings

Then, I try: 'mcs -r:System.Data.dll HelloWorld.cs' and it compiles 
without problems.

But when I try running it with 'mono HelloWorld.exe' I get
Unhandled Exception: System.DllNotFoundException: gda-2
in (wrapper managed-to-native) System.Data.OleDb.libgda:gda_init 
(string,string,int,string[])
in <0x00031> System.Data.OleDb.OleDbConnection:.ctor ()
in <0x0000a> System.Data.OleDb.OleDbConnection:.ctor (System.String 
connectionString)
in (wrapper remoting-invoke-with-check) 
System.Data.OleDb.OleDbConnection:.ctor (string)
in <0x00028> System.Data.OleDb.OleDbDataAdapter:.ctor (System.String 
selectCommandText, System.String selectConnectionString)
in (wrapper remoting-invoke-with-check) 
System.Data.OleDb.OleDbDataAdapter:.ctor (string,string)
in <0x00034> HelloWorld.Program:Main (System.String[] args)

Here I am stuck - What do I do to get around that 
System.DllNotFoundException?
Google gives me nothing.

Thanks in advance,
/Morten
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
  


		
---------------------------------
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.


[Attachment #5 (text/html)]

<DIV>Short Answer:</DIV>  <DIV>&nbsp;</DIV>  <DIV>System.Data.OleDb is \
unmaintained.&nbsp;&nbsp; There is no support for Access nor Jet databases.</DIV>  \
<DIV>&nbsp;</DIV>  <DIV>Long Answer:</DIV>  <DIV>&nbsp;</DIV>  <DIV>No one maintains \
System.Data.OleDb anymore.</DIV>  <DIV>&nbsp;</DIV>  <DIV>System.Data.OleDb requires \
requires libgda from the gnome-db project at <A \
href="http://www.gnome-db.org/">http://www.gnome-db.org/</A>&nbsp; however it only \
works on Linux.&nbsp;It does not work on Windows.&nbsp;Well, there have been attempts \
to&nbsp;port it to&nbsp;Win32, but I&nbsp;don't think they have been \
successful.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Jet is the database egine used for \
Microsoft Access databases.&nbsp;&nbsp; Mono does not support Access nor Jet.&nbsp; \
Libgda has a provider for MDB Tools which allows you to read mdb files.&nbsp; </DIV>  \
<DIV>&nbsp;</DIV>  <DIV>There are some patches to Mono for COM Interop.&nbsp; So, you \
could try to get data from Jet via this.&nbsp;  But the
 COM Interop is not mature yet.&nbsp; You have to search the mailing lists for the \
patches because they have not been committed to our subversion repository yet.</DIV>  \
<DIV><BR><B><I>Morten &lt;monouser@mikkelsens.net&gt;</I></B> wrote:</DIV>  \
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: \
#1010ff 2px solid">Hi.<BR>Hoping to no offend anyone with a newbie-question.<BR>I \
just installed mono and found some examples that I am trying to get up <BR>and \
running, but something very basic stops me.<BR>I am using mono-1.1.13.2 on a \
Windows2000 machine.<BR>What doesn't work is:<BR><BR><PRE><BR>using System;<BR>using \
System.Data;<BR>using System.Data.OleDb;<BR><BR>namespace HelloWorld {<BR>   class \
Program {<BR>     private static string dbConPrefix =<BR>       \
"provider=Microsoft.JET.OLEDB.4.0; data source=C:\accessdb.mdb";<BR><BR>     static \
void Main(string[] args) {<BR>       string sqlStmt = "SELECT * FROM aTable";<BR>     \
OleDbDataAdapter da =  new
 OleDbDataAdapter(sqlStmt, dbConPrefix);<BR>       DataSet ds = new DataSet();<BR>    \
da.Fill(ds, "SomeData");<BR>     }<BR>   }<BR>}<BR></PRE><BR><BR>When I compile with \
just 'mcs HelloWorld.cs', I get:<BR>HelloWorld.cs(2,7): error CS0234: The type or \
namespace name `Data' does <BR>not exist in the namespace `System'. Are you missing \
an a<BR>ssembly reference?<BR>HelloWorld.cs(2,1): error CS0246: The type or namespace \
name <BR>`System.Data' could not be found. Are you missing a using directive o<BR>r \
an assembly reference?<BR>Try using -r:System.Data<BR>HelloWorld.cs(3,7): error \
CS0234: The type or namespace name `Data' does <BR>not exist in the namespace \
`System'. Are you missing an a<BR>ssembly reference?<BR>HelloWorld.cs(3,1): error \
CS0246: The type or namespace name <BR>`System.Data.OleDb' could not be found. Are \
you missing a using direc<BR>tive or an assembly reference?<BR>Compilation failed: 4 \
error(s), 0 warnings<BR><BR>Then, I try: 'mcs -r:System.Data.dll HelloWo  rld.cs'
 and it compiles <BR>without problems.<BR><BR>But when I try running it with 'mono \
HelloWorld.exe' I get<BR>Unhandled Exception: System.DllNotFoundException: \
gda-2<BR>in (wrapper managed-to-native) System.Data.OleDb.libgda:gda_init \
<BR>(string,string,int,string[])<BR>in &lt;0x00031&gt; \
System.Data.OleDb.OleDbConnection:.ctor ()<BR>in &lt;0x0000a&gt; \
System.Data.OleDb.OleDbConnection:.ctor (System.String <BR>connectionString)<BR>in \
(wrapper remoting-invoke-with-check) <BR>System.Data.OleDb.OleDbConnection:.ctor \
(string)<BR>in &lt;0x00028&gt; System.Data.OleDb.OleDbDataAdapter:.ctor \
(System.String <BR>selectCommandText, System.String selectConnectionString)<BR>in \
(wrapper remoting-invoke-with-check) <BR>System.Data.OleDb.OleDbDataAdapter:.ctor \
(string,string)<BR>in &lt;0x00034&gt; HelloWorld.Program:Main (System.String[] \
args)<BR><BR>Here I am stuck - What do I do to get around that \
<BR>System.DllNotFoundException?<BR>Google gives me nothing.<BR><BR>Thanks in  \
advance,<BR>/Morten<BR>_______________________________________________<BR>Mono-devel-list \
mailing list<BR>Mono-devel-list@lists.ximian.com<BR>http://lists.ximian.com/mailman/listinfo/mono-devel-list<BR></BLOCKQUOTE> \
<DIV><BR></DIV><p>  <hr size=1>Do you Yahoo!?<br> 
With a free 1 GB, there's more in store with <a \
href="http://us.rd.yahoo.com/mail_us/taglines/mailstorage/*http://mail.yahoo.com/">Yahoo! \
Mail.</a>



_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic