Error on EndCurrentEdit

  • Thread starter Thread starter Hemang Shah
  • Start date Start date
H

Hemang Shah

Hello

This one is killing me!!

If I make changes to only one record, sometimes it works.
If I make changes to multiple records, it gives me "Object reference not set
to an instance of an object." }

When I trace it, it gives me this error on:


this.BindingContext[dvClient].EndCurrentEdit()



Here is the stackTrace


StackTrace :

at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState
oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState
oldState2, DataViewRowState newState2)\r\n at
System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
DataRowAction action, Boolean isInMerge)\r\n at
System.Data.DataRow.SetNewRecord(Int32 record)\r\n at
System.Data.DataRow.EndEdit()\r\n at System.Data.DataRowView.EndEdit()\r\n
at System.Windows.Forms.CurrencyManager.EndCurrentEdit()\r\n at
ClientManagementPro.Form1.UpdateDataSet() in f:\\my documents\\visual studio
projects\\clientmanagementpro\\clientmanagementpro\\frmclient.cs:line
4793\r\n at ClientManagementPro.Form1.SaveToDatabase() in f:\\my
documents\\visual studio
projects\\clientmanagementpro\\clientmanagementpro\\frmclient.cs:line 4775"
string



Can anyone make out anything out of this? Why would EndCurrentEdit throw a
null exception!


Are there any tools which I can use to point this error?

Any help would be highly appriciated.

Thanks
 
Please Hemang,

Dont't multipost, if you want to explain your messages more, do it than as
an answer to the original. CT and I have answered this in your follow up
message.

Thanks in advance,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top