Client.openConnection

Establishes a connection to a data source. The connection will be opened if no identical connection is available in the GdaClient connection pool, and re-used if available. If you dont want to share the connection, specify GDA_CONNECTION_OPTIONS_DONT_SHARE as one of the flags in the options parameter. This function is the way of opening database connections with libgda.

class Client
openConnection
(
string dsn
,
string username
,
string password
,
GdaConnectionOptions options
)

Parameters

dsn string

data source name.

username string

user name.

password string

password for username.

options GdaConnectionOptions

options for the connection (see GdaConnectionOptions). Returns : the opened connection if successful, NULL if there is an error.

Meta