How is ASP. NET dataset (. xsd) used? Then, let's start our demonstration:
Datasets (. xsd) can be visualized to complete the compilation of all database operation functions, that is, complete all the contents of the DAL layer, which is very convenient. Next let's see how to use it:
ASP. NET dataset (. xsd) use 1. Create an ASP. NET Dataset:
ASP. NET dataset (. xsd) use 2. Add a TableAdapter:
ASP. NET dataset (. xsd) Use 3. Select database connection:
Use ASP. NET dataset (. xsd) 4. Select the command type:
ASP. NET dataset (. xsd) Use 5. Enter the SQL statement:
Use ASP. NET dataset (. xsd) 6. Select the method to be generated:
ASP. NET dataset (. xsd) is displayed on the page 7. The created method is as follows:
Next, let's see how to call the GetUsers method:
Program code
- MyDataTableAdapters.Union_UserTableAdapter dal = new MyDataTableAdapters.Union_UserTableAdapter();
-
- GridView1.DataSource = dal.GetUsers(11000).DefaultView;
- GridView1.DataBind();
Note that the namespace MyDataTableAdapters is in the format of: DataSet name (MyData) + TableAdapters
The example of using the ASP. NET dataset (. xsd) is introduced here. I hope to help you understand the use of the ASP. NET dataset (. xsd.
- Implementation of ASP. NET data collection
- Use of SqlHelperSqlHelper in ASP. NET data access layer
- Hash Algorithm for ASP. NET Data Encryption
- Implement ASP. NET data encryption using symmetric encryption algorithms
- ASP. NET data import implementation Excel to MSSQL