I'm having some issues retrieving data from an OLEDB database. In a certain column it contains about 400 or so characters, but when I read it into my dataset or read it using a DataReader, all I get is the first 199 characters. I'm completely stumped as to why the data is being truncated. Any thoughts?

Thanks.

Give me sample of your code especially when you read via DataReader

Also, can you provide your connectionstring? I've never had these types of problems using OLEDB.

What type of database are you using?

Here's the code when it reads it. oledbCommand is just the SQL command.

// Fill the dataset with data
OleDbDataAdapter da = new OleDbDataAdapter( oledbCommand, connection );
da.Fill( ds );

// If there are no rows, return an empty datatable
if ( ds.Tables[ 0 ].Rows.Count == 0 )
{
     return new DataTable().Rows;
}

// Return the rows
return ds.Tables[ 0 ].Rows;

And here is the connection string:

connectionString = @"Provider=ASAProv;Data source=BOMF1;uid=dba;password=sql;";

It doesn't look like anything is out of order to me. As for the database itself, it's Adaptive Server Anywhere 8.0.

Have you googled for that particular provider, ie, any issues surrounding it?

I'm not familiar with that provider, but it could be a limitation of it. I've used Jet and SQL just fine through OLEDB...

me too!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.