C
Cowboy \(Gregory A. Beamer\)
The easiest method for existing DataSets is as follows:
Add this line after the creation of the dataset:
DataSetName.WriteXmlSchema(filePath);
Be sure to set up the file path and name the file .xsd.
Then, open the .xsd file and copy the resulting "tables" into a DataSet you
add to the project. Finally, change the line like so:
DataSet DataSetName = new DataSet();
to
StronglyTypedDataSetTypeName StronglyTypedName = new
StronglyTypedDataSetTypeName();
And, you are rolling.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside the box!
*************************************************
Add this line after the creation of the dataset:
DataSetName.WriteXmlSchema(filePath);
Be sure to set up the file path and name the file .xsd.
Then, open the .xsd file and copy the resulting "tables" into a DataSet you
add to the project. Finally, change the line like so:
DataSet DataSetName = new DataSet();
to
StronglyTypedDataSetTypeName StronglyTypedName = new
StronglyTypedDataSetTypeName();
And, you are rolling.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside the box!
*************************************************