Database Access withVB.NET and ADO.NET
The vast majority of applications today have to perform some sort of database access. Whether you are building Windows applications and want to perform simple database access, or you are creating middle-tier components to handle database access, understanding how to connect to a database, retrieve information, and manipulate data are critical to understanding how to move to VB.NET.8088端口实验接线表
First, VB.NET introduces new tools for connecting to databases. Some of these tools are controls that act as wrappers around the database access objects, called ADO.NET. These controls simplify the code you write, and allow you to bind graphical controls to DataSets you generate from the database. These controls require a new way of working with data-bound controls in your application.
Second, ADO has evolved into ADO.NET. The ADO.NET functionality is different from what you are used to with ADO. Although similar in concept, the ADO.NET objects follow a disconnected paradigm. One of the major differences is that you are not necessarily retrieving the equivalent of a recordset, but an entire schema structure.
About ADO.NET
As I’ve mentioned many times before, ADO.NET uses a disconnected architecture to operate. The reason for this is that traditional applications that maintained an open database connection did not scale well. If a component opened a connection to the database and held it open for the lifetime of the application, it consumed expensive database resources, when the connection probably was needed for only a small percentage of that time. As the number of users grows, the overhead of the database connections can begin to affect the database performance negatively. Therefore, Microsoft decided to use a disconnected architecture for ADO.NET. This not only solves the problems with scalability by reducing the number of active connections, it makes it much easier to transfer data from one component to another. You do not need to have both components connected to the database, nor do you have to have them both understand some binary format of the data, as you will see in a moment.DJ88K实验箱使用说明
Additionally, Microsoft recognized that in much programming today, you basically have a disconnected application architecture, thanks to the Web. Think of a typical Web application: The user requests a page and the page is generated on the server, with a mix of HTML and data from the database. By the time the page is sent back to the user and rendered in his browser, the connection to the database is no longer needed. Therefore, if it takes one second to render a page but the user views it for 本文来自辣.文,论-文。网原文请找腾讯752018766 a connected architecture, Microsoft recommends you use ADO. ADO.NET is inherently disconnected, so ADO is still a better approach if you need a continuous connection to the underlying database.2746