Welcome to FoxLearn
In this tutorial, I'll show you how to create a phone diary using a DataSet as a database
Right click on your project, then add a DataSet to your project
Next, Add a PhoneBook table to your DataSet
The DataSet, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture
The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects
You can also enforce data integrity in the DataSet by using the UniqueConstraint and ForeignKeyConstraint objects
Drag the datasource detail into your windows forms application,
then design a simple UI that allows you to insert update delete data into the PhoneBook table
As you can see, bindingsource control is automatically created when you drag data fields into your windows forms application
The BindingSource component is designed to simplify the process of binding controls to an underlying data source
The BindingSource component acts as both a conduit and a data source for other controls to bind to
It provides an abstraction of your form's data connection while passing through commands to the underlying list of data
Additionally, you can add data directly to it, so that the component itself functions as a data source
You can use the WriteXml method to save the data to a file
The WriteXml method provides a way to write either data only, or both data and schema from a DataSet into an XML document,
whereas the WriteXmlSchema method writes only the schema
You can also use the ReadXml method to read data from a file
The ReadXml method provides a way to read either data only, or both data and schema into a DataSet from an XML document,
whereas the ReadXmlSchema method reads only the schema
The Filter property allows you to view a subset of the DataSource
Only underlying lists that implement the IBindingListView interface support filtering
To form a filter value, specify the name of a column followed by an operator and a value to filter on
The accepted filter syntax depends on the underlying data source
The value of the Filter property affects the value of the Count property
Additionally, the Filter value will persist when the data source changes
As you can see, your data file has been created in the Debug folder
Thank you for watching this video and don't forget to subscribe to my channel