OdbcDataReader 4000 byte limit on strings?
- From: tim <tim@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Jan 2007 20:11:01 -0800
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);
.
- Prev by Date: Re: Weird ODBC Error - KB-SQL
- Next by Date: for earlie: genuinely successful news - rol is ugda oy - (1/1)
- Previous by thread: Weird ODBC Error - KB-SQL
- Next by thread: for earlie: genuinely successful news - rol is ugda oy - (1/1)
- Index(es):
Relevant Pages
|
Loading