473,378 Members | 1,394 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,378 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 3297
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.