In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "what is the use of ADO .NET components?". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
When querying rows that meet certain criteria in a dataset, viewing tables based on ADO .NET components will improve performance. When you assign a primary key (PrimaryKey) value to a data table, an index is established. Indexes are also established when a data View (DataView) is established for a data table.
Yeah, what exactly did myAda do for us here? It also does a lot, it has to automatically open our database connection, that is, the connection object has been defined in the above code, and then find the SelectCommand command of the myAda data adapter.
According to this SelectCommand command to query the data in the data table, * put the extracted data into a DataTable in DataSet (in this case, mySet) (in this case, UserInfo), and when all is done, it will responsibly close the connection it opened. Haha, a very nice guy!
After we edit the data in the dataGridView control, the ADO .NET component will first reflect the change to the DataTable of the associated DataSet, and then the data adapter will play, call its Update*** method directly, and write the changes of our data to the source data table.
The SqlCommand command of DataAdaper is still behind the *. We have configured them before, so let's leave everything here to the Update method. Here is mySet.Tables [0] .AcceptChanges (), which is very useful, or you update one and then update the second and third, because after one update, the ADO .NET component hangs for this update, and the next update will repeat the last pending change, so you must call AcceptChanges after each update to clear the pending changes.
ADO.NET is a cross-era improvement to Microsoft ActiveX Data Objects (ADO) that provides platform interoperability and scalable data access. Because the transmitted data is in XML format, any application that can read XML format can process the data. In fact, the component that accepts the data does not have to be an ADO .NET component, it can be a Microsoft Visual Studio-based solution or any application running on other platforms. When I used to do database access.
You need to stay connected to the database all the time and will not disconnect the database until you have obtained all the data that meets the needs. This kind of database access is called connected data access technology. Compared with the previous connected data access technology, ADO.NET not only provides connected data access technology, but also provides another disconnected solution, that is, to simulate a database in memory, that is, the database in memory. We know that in actual database technology, each database is a business logic unit, and ADO .NET components generally this database contains all the data needed to implement an application or a website.
This is the end of the content of "what are ADO .NET components for?". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.