473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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**


Nov 20 '05 #1
4 3299
I solve my problem la .
I re-bind my datagrid . that's oks

"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:eP*************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
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**

Nov 20 '05 #2
Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:OI**************@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
I solve my problem la .
I re-bind my datagrid . that's oks

"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:eP*************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
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**


Nov 20 '05 #3
Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:OI**************@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
I solve my problem la .
I re-bind my datagrid . that's oks

"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:eP*************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
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**


Nov 20 '05 #4
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" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:OI**************@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
I solve my problem la .
I re-bind my datagrid . that's oks

"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:eP*************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
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**



Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eugene | last post by:
Hello all, I've been trying to figure this out for a few days now, and still have no clue what's going on... I have a few related tables in MS Access (Clients, Cars, Sales), and a datagrid,...
4
by: Andrea | last post by:
Hi there, I have a problem. I am running a program that used to work when suddenly...it stop working. I got this message: "Index was outside the bounds of the array" Is there anyone who...
1
by: Joe | last post by:
This is a weird problem. when doing trying to add a tabpage to a tabcontrol I get an error: Index was outside the bounds of the array. Now this only happens when I call a function from within...
1
by: Jéjé | last post by:
Hi, I receive this error when I execute a beta 2 ASP.Net application on an RTM server: Index was outside the bounds of the array. System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i,...
0
by: Trapulo | last post by:
I've a datagrid filled with a collection of objects that inherits from basecollection. When I remove an item from this collection and then click onto the datagrid, I've always this error: ...
3
by: Tim | last post by:
Hi, The following code works just fine in VS 2003 but in VS 2005 I am getting an error: The code: DateTime dClose = System.Convert.ToDateTime(now.Date.ToString("MMM dd, yyyy") + " " +...
11
by: Tim | last post by:
Hi, I am trying to do something simple. Convert a string date to datetime but it is not working and is giving me a baffling error! System.Convert.ToDateTime("Jan 30, 2006")...
0
by: Beaker | last post by:
I am having some trouble with an array object and a web service I have. I have a farly simple user object public class User { private Guid myUserId; public Guid UserId { get { return...
4
by: weird0 | last post by:
I have no idea why this error this is coming and how can i fix it? Can anyone please help me with it..............? public static class BillManager { private static Object ExecuteSP(Object...
3
by: kalaivani572 | last post by:
i am getting "Index was outside the bounds of the array." error when i try to get the checked items from list view. the code is private void btnFinish_Click(object sender, EventArgs e) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.