By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,084 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,084 IT Pros & Developers. It's quick & easy.

SqlDataAdapter.Fill problems

P: n/a

i want to fill a data table from a dataset using SqlDataAdapter.fill(myTable),
but i get the error: System.NullReferenceException: Object reference not set
to an instance of an object.

more of the error i get:
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState
oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState
oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
DataRowAction action, Boolean isInMerge)
at System.Data.DataTable.LoadDataRow(Object[] values, Boolean
at System.Data.Common.SchemaMapping.LoadDataRow(Boole an clearDataValues,
Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(S chemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Ob ject data, String
srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords,
DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDataReader
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

the table and the dataset are instantiated, there's no problem about that,
but the program crashes with this error only from time to time. i'm using sql
server 2000.

can somebody help me?

thank you.
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.