[Mono-list] ODBC & Mono 2.0? Mine broke.

timo_p timotheus.pokorra at gmail.com
Tue Oct 21 09:11:46 EDT 2008


Hello,
we also found several problems with Mono 2.0 and ODBC.
I am a bit surprised that the release notes of 2.0 don't mention anything
about the work that has obviously been done in System.Data between April
2008 (release of Mono 1.9.1) and October 2008 (Mono 2.0). The subversion log
shows a lot of changes.

Can the Mono team please let us know if they expect any problems with it?

I have a problem e.g. with the constructor
public OdbcParameter(string name,Object value)
with a string parameter.
It worked before like this, and still does in Microsoft .net 2.0:
        parameters[0] = new OdbcParameter("partnershortname",
(System.Object)"Pok%");
But now with mono 2.0 we get this exception:
System.Data.Odbc.OdbcException: ERROR [22001] [DataDirect][ODBC PROGRESS
driver]String data, right truncated.  Error in parameter 1.
The workaround is:
       parameters[0] = new OdbcParameter("partnershortname",
OdbcType.VarChar, 20);
       parameters[0].Value = (System.Object)"Pok%";

My colleague will file a bug report in Bugzilla for this, and there are
other bugs as well that I have not fully analysed yet. 
My question is:
What are the changes to System.Data, and is there still work going on in
that area?

Thanks,
  Timo


Adam Tauno Williams-2 wrote:
> 
> Has anyone tried the ODBC provider in Mono 2.0?  I updated my
> workstation to 2.0-15 (i586) and my database connections now fail with
> the rather mangled looking:
> 
> ERROR [I000] [unixODBC][
>   at System.Data.Odbc.OdbcConnection.Open () [0x00000] 
> Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [I
> 
> whereas the same code still works perfectly on my server, which is Mono
> 1.2.6-4.
> 
> Make the same connection sing the isql CLI utility provided by unixODBC
> works.  Both machines are openSUSE 32-bit.  The driver the Informix ODBC
> driver managed through unixODBC.
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/ODBC---Mono-2.0---Mine-broke.-tp19884966p20089997.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list