Can improve performance by maintaining record caching in the dataset locally. For example, you can store 10 of pages of data in a local connection object, query the data source for new data only when the user navigates beyond the first or last page, but still require the ability to write the correct connection string, using the following method:
1, a new file, such as Test.udl double-click Test.udl, opens a Data Link Properties dialog box, which defaults to the Connection property page.
2. Click the tab to go to the Provider property page and select the data you want to connect to by default Microsoft OLE DB Provider for ODBC Drivers
3. If you use a SQL Server server, you can choose Microsoft OLE DB Provider for SQL server to go to the Connection property page, where you can specify a data source name or server name and other connection information.
4, click the "Test Connection" button, you can check the configuration is correct, whether you can connect to the server. (If the server is remote and cannot be connected by name, you can use an IP address in the server name)
5. If the test passes, press OK to close the dialog box. Rename the test.udl to Test.txt, or open the file directly in Notepad.
6. Copy a line of the file representing the connection string and paste it into your program.
Ado. NET enables datasets and DataReader to extract data from a data source. The former is a cached memory, and you can access it from any direction and make changes at will. The latter is a highly optimized object, which moves forward only in a read-only recordset. Note: The DataSet looks like a static cursor, but actually, in. NET, the DataReader object corresponds to the ADO read-only cursor.
In the connection object, although there is no support for server-side cursors, this does not mean that you cannot use cursors. In fact, the steps you need to take are in. NET, you can run the local connection object in your own program simply by right-clicking on References node.
But I personally think that when you want to turn. NET, please consider carefully. First, be sure to completely enter the connection object, which does not take much time and effort, which is to. NET take the first step,. However, this is only the first step of long march and it leads to. NET must be a step. . NET's true added value is based on a uniform, consistently stable interface and the wide application of local classes. About COM libraries can be supported, reasonable, but not encouraged, because it is only a short-term solution, or a transitional step.