473,520 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datatable.clear

Hello everyone,

I need some help in here. I have the following code

p_odsDataset.Tables("MyTable").Clear()

The problem is, everytime this code is being executed, I am having this
error "Cast from type 'DBNull' to type 'Double' is not valid." This error is
not being captured by Try catch block. It shows the message and it does not
go to the catch statement.

Please, anyone help me with this.

Thanks in advance,
Darkstar
Nov 23 '05 #1
0 954

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

Similar topics

12
2262
by: Doug Bell | last post by:
Hi, I am having problems trying to create a (temporary) DataTable from a selection from a DataGrid (dgOrders). dtOrdDetails is declared as a Public DataTable Sub is: Dim stFilter as String Dim OrdersRows() as DataRow
1
1495
by: Simon | last post by:
Hi All, I have a DataGrid bound to a DataTable. Every once in a while I need to refresh the data in the table so that the updated data is displayed in the DataGrid. Here's how I am attempting this: 'clear datatable datatbl.Rows.Clear() If PLCCount() <> 0 Then
6
1690
by: Danny Ni | last post by:
Hi, If I want to programatically add rows to a DataTable, do I call AcceptChanges per row? Or do I call AcceptChanges after all rows added? TIA
0
4818
by: Flack | last post by:
I have pasted at the end of this message a small sample program I whipped up to do some testing. It's a form with a datagrid and two buttons. Each button clears the dataTable that is the source of the dataGrid, and then adds five rows. Button2 is the same as button1 just that it does this in a different thread (I was testing if I was...
4
7671
by: Brett Romero | last post by:
I fill a DataTable with search results, which take a very long time if I first clear it. The values come from an object and I map them into the corresponding table columns. I may have 65000 results. I iterate through them, create a new row, fill it, and add it to the DataTable for each interation. This works fine on the first search. ...
4
2944
by: Adrian Parker | last post by:
We've suddenly started getting a problem with a call to clear the contents of a DataTable. This is on a live customer site that's been working fine until yesterday. As far as we know they've not changed or updated the server in any way. "There is no row at position 42" at System.Data.RBTree`1.GetNodeByIndex(int32 userIndex) at...
8
11025
by: cj | last post by:
I have a program to display queries to a SQL db. I type my query in a textbox and click a button and the results display in a datagrid. I could use either dataset or datatable to read the data in then I make the datagrid.datasource = myds.Tables(0) or mydt. Now what I want is to be able to change the query and click the button again and get...
0
2283
by: XenReborn | last post by:
Ok this should be simple. I made a form, added a combobox (for selecting items to edit, not for updating fields), several textboxes, a few checkboxes etc. On formshow it connects to my database, draws down the existing data, no problem. All the records in the datatable that were the result of a query, I could select from, and the other databound...
1
6726
by: tshad | last post by:
Running on VS.net 2005, I am trying to copy rows from my datatable to another datatable in the same dataset. The schema would be identical. I need to make the table name "forms" as I am passing this dataset to function that expects a dataset with a datatable in it.
4
1699
by: inadsad | last post by:
Good day Group, I have a form with a datagrid and two buttons. On show button datagrid is populated with a datatable and on clear button datagrid is cleared. DataTable.Clear not only removes all of the data from the DataTable, it clears the dataset as well. Why datatable.clear sets dataset to 0 rows? Thanks Ian
0
7326
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7243
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7471
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7632
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7213
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
4809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
1687
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
533
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.