471,319 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

datatable.HasChanges() ?

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 you can check a
datatable for changes, ie

if (CustomerData.HasChanges())

However when I try to build this I get the error:

Error 1 '<blah>DataTable' does not contain a definition for 'HasChanges'

Am I doing something stupid or do datatables not have this method available?

Thanks,

Peter

Dec 21 '05 #1
5 16684
mrstrong <mr******@hotmail.com> wrote:
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 you can check a
datatable for changes, ie

if (CustomerData.HasChanges())

However when I try to build this I get the error:

Error 1 '<blah>DataTable' does not contain a definition for 'HasChanges'

Am I doing something stupid or do datatables not have this method available?


There is no DataTable.HasChanges() method - there is only
DataSet.HasChanges().

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dec 21 '05 #2
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
mrstrong <mr******@hotmail.com> wrote:

and it appears to suggest in the SaveData_Click method that you can check
a
datatable for changes, ie

if (CustomerData.HasChanges())

However when I try to build this I get the error:

Error 1 '<blah>DataTable' does not contain a definition for 'HasChanges'

Am I doing something stupid or do datatables not have this method
available?


There is no DataTable.HasChanges() method - there is only
DataSet.HasChanges().


Thanks. So the 'save' method on the walkthrough was not right?

http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx

Regards,

Peter

Dec 21 '05 #3
mrstrong <mr******@hotmail.com> wrote:
There is no DataTable.HasChanges() method - there is only
DataSet.HasChanges().


Thanks. So the 'save' method on the walkthrough was not right?

http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx


Looks like it, yes.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dec 21 '05 #4
Correct the DataTable class just defines DataTable.GetChanges() Method.

Dec 21 '05 #5
"theiwaz" <ma***********@ascirum.de> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Correct the DataTable class just defines DataTable.GetChanges() Method.


Hmmm.. Not in front of my work machine at present so cant try this out, but
can a datatable be NULL?

So could the following be used to test for changes to a datatable:

if (DataTable.GetChanges() != NULL)

?

(not sure about the exact syntax)

Peter


Dec 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by David Thielen | last post: by
5 posts views Thread by fh | last post: by
1 post views Thread by Osmosis | last post: by
2 posts views Thread by mrstrong | last post: by

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.