Re: [Mono-list] Still problems with database access using ODBC

Daniel Freund lunkwill at gmx.net
Tue Jul 12 03:56:51 EDT 2005


Hi Rafael,

I know that ODBC isn't the preferred way to connect to databases. So that
statement is not very helpful for me. But right now ODBC is the only way to
do it if not using the OpenLink driver. As you have stated IBM only delivers
an ADO.NET driver for Windows and that driver is not fully managed code and
therefore not usable in Linux environments.

Of course I really appreciate the help of Suresh. I also know (ehm,
experience) that System.Data.Odbc is not fully tested. That's what I'm doing
right now :-). And I don't have a problem with testing.

But if ODBC is not a target to develop, it would be nice to know that I'm on
my own. In this case it would be cool if somebody can give me some hints
where to start hacking.
Also I want to remind that the Mono ODBC site states that the "action plan"
is to fix bugs and to test other setups. If that's not correct somebody
please update the website. The ODBC namespace isn't too far away from being
usable. So why not make it rock?

keep on hacking,

/daniel

> Daniel,
> 
> ODBC isn't the best way to connect databases with ADO.NET, period.
> 
> Although Suresh has been committing some patches recently on the
> System.Data.Odbc namespace, I don't think it is thoroughly tested with
> multiple database server types, as it is simply not feasible.
> 
> Unfortunately the only ADO.NET provider for Informix I've found  is a
> commercial one from the fine people at OpenLink:
> http://uda.openlinksw.com/ado.net/mt/dotnet-informix-mt/
> 
> IBM itself doesn't like .NET very much so they only tell how to use ODBC
> to connect from ADO.NET to an Informix server. As they favor Java their
> JDBC driver is in better shape as it is a pure-Java (Type 4) driver. So
> it may be possible to use it through IKVM on Mono, but it is not in any
> way easily integratable with ADO.NET's DataTables/DataSets.
> 
> :(
> 
> On Mon, 2005-07-11 at 13:28 +0200, lunkwill at gmx.net wrote:
> > Hi Suresh!
> > 
> > thanx for the quick help. But I'm afraid it won't help. 
> > I now compiled the Mono snapshot from 2005-07-08 from scratch and tested
> > again.
> > As a result I get no exceptions but also no results when accessing
> firebird 
> > SQL. When using Informix (my production db) I now get the following
> > exception:
> > 
> > Unhandled Exception: System.Data.Odbc.OdbcException:
> > [unixODBC][Informix][Informix ODBC Driver]String data right truncation.
> > in <0x00131> System.Data.Odbc.OdbcCommand:ExecSQL (System.String sql)
> > in <0x00073> System.Data.Odbc.OdbcCommand:ExecuteNonQuery (Boolean
> > freeHandle)
> > in <0x00011> System.Data.Odbc.OdbcCommand:ExecuteReader (CommandBehavior
> > behavior)
> > in <0x0000c> System.Data.Odbc.OdbcCommand:ExecuteReader ()
> > in (wrapper remoting-invoke-with-check)
> > System.Data.Odbc.OdbcCommand:ExecuteReader ()
> > in <0x002a6> MainClass:Main (System.String[] args)
> > 
> > Meanwhile I crosschecked with Python/ODBC from my SLES9 to ensure that
> the
> > Informix ODBC driver is capable of SqlParameter at all.
> > 
> > Still nobody else with problems like this?
> > 
> > Best regards,
> > 
> > /daniel
> > 
> > > > Hi all!
> > > > 
> > > > Nearly 2 months ago I posted a bug (
> > > > http://bugzilla.ximian.com/show_bug.cgi?id=74917 ) about using SQL
> > > > parameters in ODBC queries.
> > > > In short: using OdbcParameter with int-parameters works; with char
> and
> > > > varchar-parameters it fails
> > > 
> > > i've just did a work-around fix. hope that helps you. I've been using 
> > > WCHAR & WVARCHAR and it seems it is not fully supported from odbc 
> > > provider. It is working with sqlserver odbc tds driver, which I tested
> > > now.
> > > 
> > > suresh.
> > > 
> > 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


More information about the Mono-list mailing list