OdbcDataReader 4000 byte limit on strings?



ASP.NET 2.0 C# codebehind against an MSDE database.
I am connecting and reading a table just fine, except that there is a table
column that sometimes has strings longer than 4000 characters (I am reading
stored procedures) but they always seem to get truncated to 4000.

Originally I was using OleDB interfaces (with same problem) but found some
articles hinting that OdbcDB would take care of this issue.

Any idea ahat am I doing wrong?

example code:

while (myReader.Read())
{
DataRow dr = dt.NewRow();
dr["SPECIFIC_NAME"] = myReader["SPECIFIC_NAME"];
dr["ROUTINE_TYPE"] = myReader["ROUTINE_TYPE"];

// this proves the field 2 is a System.string
mytype = myReader.GetFieldType(2);

// GetString was truncated to length=4000, so try GetValues -- same
result!
object[] oa = new object[3];
myReader.GetValues(oa);
dr["ROUTINE_DEFINITION"] = oa[2].ToString() ; //
myReader.GetString(2);

.



Relevant Pages

  • Re: Connection via proxy
    ... after some investigation on my part and reading ... was connecting through a DHCP .. ... Do you Yahoo!? ... To unsubscribe, ...
    (freebsd-questions)
  • Re: Mac celebreport
    ... Rexx Magnus wrote: ... > There I was, reading the title of the thread quickly, thinking that ... > someone had devised a new socket for connecting one's brain to the mac. ...
    (uk.comp.sys.mac)
  • Re: Qtek 9100 - Activesync 4.1 wont connect
    ... > my Qtek to my laptop to load software or music via USB. ... > just says 'connecting' but never connects. ... You followed the install instructions and connected the ppc when told during ... clicking OK but not reading what you are being told? ...
    (microsoft.public.pocketpc.activesync)
  • Re: Serial port programming
    ... Acutally, I am reading a signal from a device connected to serial port, ... i initially checked the RS-232 line the results ie., connecting the ... I got r_num as 0 and r_buf with no response. ...
    (comp.unix.programmer)
  • Re: "The connection to the server has failed", error code 0x800CCC0E
    ... PA Bear wrote: ... > Kath Adams wrote: ... >> I was reading a thread in another NG and someone seemed to have the ... >> same problem as you connecting to web sites even though they were ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)

Loading