Data Connection Methods

The objects described in Chapter 5 are generic so they work with any kind of database. It doesn’t matter to a DataTable object whether you loaded its data from an Access database, a SQL Server database, an Oracle database, an XML file, or whether your program generated the data in the DataTable itself. Once the data is loaded, your program can use the DataTable’s properties and methods to manipulate the data no matter where it came from.

When you want to move data between these objects and a data source, however, the difference matters. Visual Basic provides several objects and methods for working with different data sources. The most important of these methods work with program-generated data, XML data, SQL Server, and ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.