Creates a new Database instance specifying the database to connect to and SQL syntax to use with the database. Each function call of the Database class opens and closes a connection. Therefore, connection pooling should be enabled for optimal performance.

Namespace: DatabaseObjects
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
public Database(
	string strConnectionString,
	Database..::..ConnectionType eConnectionType
)
Visual Basic
Public Sub New ( _
	strConnectionString As String, _
	eConnectionType As Database..::..ConnectionType _
)
Visual C++
public:
Database(
	String^ strConnectionString, 
	Database..::..ConnectionType eConnectionType
)

Parameters

strConnectionString
Type: System..::..String
A database connection string to either a Microsoft Access, SQLServer, Pervasive or MySQL database. For example, 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=northwind.mdb;Jet OLEDB:Database Password=;'.
eConnectionType
Type: DatabaseObjects..::..Database..::..ConnectionType
Indicates the SQL syntax to generate for the database specified in strConnectionString.

See Also