O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.3. Connections

A connection is the first thing we need to access a data store. Both managed providers implement the IDbConnection interface and inherit the following properties and methods.

  • ConnectionString This property (of a String type) specifies the string used to open a connection to a data store.

  • ConnectionTimeout This property (of an Integer type) specifies the time to wait while trying to establish a connection before terminating the attempt and generating an error. The default value is 15 seconds.

  • Database This property (of a String type) specifies the name of the current database or the database to be used once a connection is open.

  • State This property returns the current state of the connection. It is of the ConnectionState type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required