asp.net.ph

DataSet.Copy Method

System.Data Namespace   DataSet Class


Copies both the structure and data for this DataSet.

[ VB ]
Public Function Copy ( ) As DataSet

[ C# ]
public DataSet Copy ( );

[ C++ ]
public: DataSet* Copy ( );

[ JScript ]
public function Copy ( ) : DataSet;

Return Value

A new DataSet with the same structure ( table schemas, relations, and constraints ) and data as this DataSet.

NOTE: If these classes have been subclassed, the copy will also be of the same subclasses.

Example

The following example uses the Copy method to create a copy of the original DataSet.

private void CopyDataSet ( DataSet myDataSet ) {
   // initialize a dataset object for the copy.
   DataSet copyDataSet = myDataSet.Copy ( );

   // ... code to work with the copy here ...
}
  C# VB

See Also

DataSet Members   Clone Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph