Click here to Skip to main content
15,914,165 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a Ms Access database. In this inside one of the table, I have a column which contain high number of characters for g. 2000 to 4000 characters.

Using Ado.net, I tried to load the values present in a particular row in the datatable for further computation.

But strangely for this particular column, datatable contains text limited to onlyu 256 characters only.

Can you suggest how can I increase length of cell in datatable, so that it can accomodate all text.

Thanks in advance.

Regards,
Ankit
Posted

 
Share this answer
 
DataColumn.MaxLength Property sets or gets the maximum length of the column in characters. If the column has no maximum length, the value is –1 (default). Is it your datacolumn that is limited to 256 characters or is it your view that only displays 256 characters? What datatype is your datatablse datacolumn? Can you post the code showing how you create your datatabla and how you fill it with data?
 
Share this answer
 
Hi,

I have this column as "Memo" in my database (Msaccess).

Also, I am simply writing a sql query using ADO.net to collect a table based on certain parameters into a DataTable.

And when I am checking the text contained in cell of that particular column, it is truncated to 256 characters only.

BTW below is the code :

----------------------

string strsql = "Select distinct c_ImageName,c_OCRText,c_Page from OCR_RawData where c_ImageName = '"+filepath[t].ToString()+"' and c_Page ='"+myPagesarray[i]+"'";

DataUtility objDUT = new DataUtility();//Class to access ADO methods

DataTable dteachfieldperpageocrvalue = objDUT.GetDataTable(strsql);

string datafetchedfromdatabase = "";
if (dteachfieldperpageocrvalue.Rows.Count > 0)
{
datafetchedfromdatabase = dteachfieldperpageocrvalue.Rows[0]["c_OCRText"].ToString();
}

--------------------------------------------------------------------

Regards,
Ankit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900