In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how ADO.NET uses the dataset, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
The process of generating typed datasets through a graphical interface is roughly divided into three steps:
Experiment step (1):
Create a database connection object. See the figure:
Figure create database connection object diagram
Select SqlConnection from the toolbox, drag and drop onto the form, the sqlConnection1 object appears in the component bar of the form designer, right-click the sqlConnection1 object, and select Properties. Find the ConnectionString property in the properties window, select "New connection" in the right drop-down bar, and pop up the "add connection" window. Fill in "(local)" at the server name of the "add connection" window, select "use SQL Server Authentication", user name is "sa", and select or enter a database name to select "school". * Click OK to close the add connection window. The string "Data Source= (local); Initial Catalog=school;User ID=sa" appears in the right column of the ConnectionString property. The previous process may vary with different servers, different databases, and different accounts. Here is just an example. I hope the reader will complete this step according to the specific situation.
Experiment step (2):
Add a new data source. See the figure:
Add a new data source graph
In the previous step, select add New data Source from the data menu in the toolbar of the. net development environment, and the data Source configuration Wizard window pops up. Click the "database" icon in this window, click "next", and then select "schoolConnectionString (Settings)". Click next twice in a row, and then select the table, view, stored procedure, or function in the form. * * Click finish to close the window.
Experiment step (3):
Create a typed dataset. See the figure:
Create a typed dataset diagram
In the previous step, select DataSet in the toolbox, drag and drop it onto the form, pop up the add dataset window, and select the typed dataset by default, named "WindowsApplication1.schoolDataSet". The name comes from "schoolDataSet" in the data source. Click OK to close the add dataset window, and the schoolDataSet1 object appears in the component bar of the form designer. After the above three steps, the typed dataset is generated in the graphical interface.
Thank you for reading this article carefully. I hope the article "how to use data sets in ADO.NET" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.