Error [Index was outside the bounds of the array] ?!

A

Agnes

I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 
A

Agnes

Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
Agnes said:
I solve my problem la .
I re-bind my datagrid . that's oks

Agnes said:
I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 
C

Cor Ligthert

Hi Agnes,

Can you show how you delete your row.
Most made mistakes in this, people are not deleting it however removing it
or are calling the acceptchanges before the update is done?

Cor
Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
Agnes said:
I solve my problem la .
I re-bind my datagrid . that's oks

Agnes said:
I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 

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

Top