The Connection Classes

The Connection classes do just as you would think. They contain the information needed to open a database connection. In addition, they are used to manage transaction objects. The five main members of this class are ConnectionString, Open, Close, and BeginTransaction.

The ConnectionString Property

The ConnectionString property is a concatenation of various elements that tell ADO .NET about the database and server you wish to connect to. A semicolon (;) separates the elements. This is not much different than ADO or ODBC. The connection string definitely traces its heritage back to the ODBC DSN string. Many of the elements are the same. The five main elements of the connection string are:

  • OLEDB Provider— The name of the ...

Get ADO.NET Programming in Visual Basic™ .NET 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.