I am having problems retrieving data from a text field from my Sybase ASE using ASP.NET. I am using the ASE OLE DB Provider instead of going through ODBC. When I try to retrieve data from the text field, it just returns unreadable characters. I have tried both the GetChars and GetBytes methods on my OleDbDataReader. THe GetBytes method throws a InvalidCastException, and the GetChars method returns the unreadable data. Here is the code I am using (theData is my OleDbDataReader) ....

int blobSize;
char[] buffer;

blobSize = (int)theData.GetChars(i, 0, null, 0, 0);
buffer = new char[blobSize];
theData.GetChars(i, 0, buffer, 0, blobSize);
theValue = new String(buffer);

Any help would be appreciated.