Fwd: Re: [Mono-list] Odbc.DataReader.GetValue returns wrong data on
CHAR columns
Daniel Freund
lunkwill at gmx.net
Tue May 17 04:40:03 EDT 2005
Oops. What I wanted to post was the following:
That only works when manually reading data iterating through a DataReader.
When using the DataReader as a DataSource for a DataGrid it leads to really
weird output.
This issue has been fixed with Mono 1.1.7
Thanx,
/daniel
Subject: Re: [Mono-list] Odbc.DataReader.GetValue returns wrong data on
CHAR columns
> Subject: Re: [Mono-list] Odbc.DataReader.GetValue returns wrong data on
> CHAR columns
>
> In the interum, can you simply .ToString().Trim() your CHAR values?
>
> > Mono Hackers!
> >
> > I've come over a problem with System.Data.Odbc. I know: why the hack use
> > ODBC?
> > My production system is Informix. And I found no (affordable) Informix
> > driver so far. If anybody has a hint in this direction, let me know!
> >
> > My problem is, that GetValue() always returns the length 255 for CHAR
> fields
> > when using ODBC.
> > This is because a NULL-character is returned at the end of the string
> (which
> > in my opinion is the actual bug). This leads to the wrong string size
> and to
> > a complete mess when I try to display a database result in a ASP.NET
> > DataGrid.
> >
> > If I remove the NULL manually, everything is OK.
> > I tested this with Mono 1.1.6 (on Windows and SLES9/unixODBC); MS .NET
> > behaves OK - no NULL characters and string length is correct.
> >
> > This is no Informix specific behaviour. It appears everytime on every
> CHAR
> > column when using ODBC. VARCHARS work OK.
> > I have created a test case for the Firebird database in Bugzilla
> > (http://bugzilla.ximian.com/show_bug.cgi?id=74758) for easier
> reproduction.
>
> --
> Michael J. Ryan - tracker1(at)theroughnecks(dot)com -
> www.theroughnecks.net
> icq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win:
> (email)
>
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
_______________________________________________
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