Note ... If you're familiar with the old ADO, you might remember creating UDL ("Universal Data Link") files in Windows 2000 where connection information was stored in a specific file type created by a dialog that looks a lot like the one here. UDL files were text files that you could change in Notepad. I wondered where Visual Studio .NET kept this same information and whether ADO .NET also created an editable text file. If you open the Visual Studio .NET Server Explorer on the View menu, you will see the available connections in a hierarchy that looks something like this (the second connection - not completely visible in this view - is for the Northwind sample database that is installed automatically by many Microsoft downloads):
The connection information that is available in VS .NET Server Explorer is actually kept in a proprietary Visual Studio .NET XML SOAP document. This is one of the changes that facilitate using ADO .NET in web based systems. Although XML is a text format and could theoretically be edited, it's not a good idea since Microsoft doesn't support changing the file directly and doesn't document it. Besides, you can do whatever you need to do with other methods in Visual Studio .NET.
Step 5 -
After closing the Data Link Properties dialog, continue the Data Adapter Configuration Wizard. The only option for this type of connection in the Choose a Query Type panel is Use SQL Statments. Click Next.
Step 6 -
The next panel is the Generate the SQL Statements panel. We'll use exactly the same SQL statement that we used in Part 2 of this series: Select * From Articles. Enter this into the text box.
Again, as in the first example, click on the Advanced Options ... button and uncheck the checkbox: Generate Insert, Update and Delete Statements. We're still not going to update the database so we won't need them.
Click Next.
Step 7 -
If the next panel looks similar to the one below, you're done! Click Finish to return to Visual Studio .NET. Notice that OleDBDataAdpter1 and OleDBConnection1 objects have been added to your project as shown on the left.
Next page >
Taking the Final Step > Page
1,
2,
3,
4,
5,
6