PC Review


Reply
Thread Tools Rate Thread

System.Data.DeleteRowInaccessibleException

 
 
Darryn Ross
Guest
Posts: n/a
 
      14th Sep 2004
Hi,

I am getting the above exception when i my Adapters Update method is called.
The method below is the second of two methods that are called when the user
clicks the "Save" button. The first is a loop that checks each record of the
data grid and makes sure the data in the columns is correct, if everything
checks out ok then this method is called.


bool result = true ;
int j = bindingManager.Count ;

try {
BatchLstConnection.Open() ;
//These Details cannot be entered by the user so the system must set them.
for(int i = 0; i < j; i++) {
BatchLstDs.Tables["tblGLBatch"].Rows[i]["TDate"] = txtDate.Value ;
BatchLstDs.Tables["tblGLBatch"].Rows[i]["GLBatchID"] =
txtJournalBatchID.Text ;
BatchLstDs.Tables["tblGLBatch"].Rows[i]["Source"] = "GL" ;
BatchLstDs.Tables["tblGLBatch"].Rows[i]["Type"] = 40 ;
BatchLstDs.Tables["tblGLBatch"].Rows[i]["Split"] = false ;
BatchLstDs.Tables["tblGLBatch"].Rows[i]["SplitID"] = 0 ;
}
BatchLstAdapter.Update(BatchLstDs, "tblGLBatch") ;
}
catch(Exception e) {
MessageBox.Show(e.Message + e.GetType().FullName,
"InsertTransactionDetails", MessageBoxButtons.OK, MessageBoxIcon.Error) ;
result = false ;
}
finally {
BatchLstConnection.Close() ;
}
return result ;


Regards

Darryn


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll sirinath Microsoft ADO .NET 2 8th Oct 2007 06:49 PM
A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll sirinath Microsoft Access 1 8th Oct 2007 06:25 PM
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Rampa Microsoft VB .NET 3 17th Jul 2006 12:12 PM
Re: An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in system.data.dll nishi.hirve@gmail.com Microsoft ADO .NET 0 31st Mar 2006 02:32 PM
first chance exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll gv Microsoft ADO .NET 0 31st Mar 2005 10:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:32 PM.