datatable.HasChanges() ?

  • Thread starter Thread starter mrstrong
  • Start date Start date
M

mrstrong

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
 
mrstrong said:
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().
 
theiwaz said:
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
 
Back
Top