Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have fill the dataset using dataadapter & reading the data from the SQL table .
in this read only one row at time from the table when reading data to fill the dataadapter it thrown exception as
'System.OutOfMemoryException'


at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
  at System.Text.EncodingNLS.GetString(Byte[] bytes, Int32 index, Int32 count)
  at System.Data.SqlClient.TdsParserStateObject.ReadStringWithEncoding(Int32 length, Encoding encoding, Boolean isPlp)
  at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
  at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
  at System.Data.SqlClient.SqlDataReader.ReadColumnData()
  at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
  at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
  at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
  at System.Data.ProviderBase.DataReaderContainer.CommonLanguageSubsetDataReader.GetValues(Object[] values)
  at System.Data.ProviderBase.SchemaMapping.LoadDataRow()
  at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
  at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
  at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
  at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)


i have wtite the 170kb data in varchar field in table .



thanks in advance
Posted

1 solution

 
Share this answer
 
Comments
vrushali katkade 15-Feb-12 3:31am    
please tell me the limitation of the datatable for one row

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