473,387 Members | 1,464 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,387 software developers and data experts.

DataRow.remove - DataTable.getChanges

144 100+
hello,

i want to update database (it's MySQL so i'm using mysqldotnetconnector provided by them) using the DataAdapter.

update goes well, but when i remove a row from the dataTable by using myTable.rows.remove(theRow). and then i want to update the tabe by using the myTable.getChanges i get the following error

Value cannot be null.
parametere name : dataTable

does removing a row by calling the rows.remove is included in the changes of a dataTable? or is there any other way but still using dataAdapter.update

Thank you,
Nov 22 '08 #1
1 2338
kenobewan
4,871 Expert 4TB
Be careful about whether you are working with connected or disconnected data. Appears that you have tried to update changes that were disconnected when made, hence you have a null value.
Nov 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JochenZ | last post by:
Hello, I have a DataGrid(View) and a DataTable. The DataTable is displayed in the DataGridView: dataGridView.DataSource = theTable; The user is allowed to select some rows and then the...
3
by: Agnes | last post by:
Dim drTemp As DataRow For Each drTemp In dtInvCharges.Select("invno ='" & Me.txtInvNo.Text.Trim & "' ") dtInvCharges.Rows.Remove(drTemp) Next I got a "Delete button" to delete all rows in that...
5
by: mrstrong | last post by:
Gday, Have been going through the walkthrough for a distributed application: http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx and it appears to suggest in the SaveData_Click method that...
5
by: samoore33 | last post by:
I use the code below to search through a DataSet: Dim t As DataTable t = result.Tables("State") Dim strExpr As String strExpr = "id = '" & theState.ToString() & "'" Dim foundRows() As DataRow...
6
by: Pete Wittig | last post by:
Hi, I have a DataTable and I want to get a subset of the rows within it. I use the Select method to get my subset and the results are in a DataRow. I want to put those Rows back into a...
5
by: rn5a | last post by:
The .NET 2.0 documentation states the following: When using a DataSet or DataTable in conjunction with a DataAdapter & a relational data source, use the Delete method of the DataRow to remove...
2
by: =?Utf-8?B?TWFyYw==?= | last post by:
In Visual Studio 2005, I am developing a Windows Mobile application, using Mobile SQL 2005. I need Data from a Database to be shown in a DataGrid, this works. But now I want to be able to get the...
6
by: cj | last post by:
If I'm sitting on a datarow for a customer and want to change his phone number only if it's blank what would I write? if myDr("phone")= "" then myDr("phone") = "mphone" endif...
0
LoanB
by: LoanB | last post by:
Hey guys need some info here. I am adding, updating and deleting data on a datagrid. I pass the datagrid's datasource (datatable dt) to my data layer. Assuming I have already created and...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
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
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,...
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
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...

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.