# Open

`FUNCTION Open ( ) AS Boolean`

Opens the connection to the database.

The connection properties should be set prior to this.

Example

    DIM $hConn As NEW Connection

    WITH $hConn
       .Type = "postgresql"
       .Host = "localhost"
       .Login = "username"
       .Password = "passwd"
       .Name = "testdb"
    END WITH

    TRY $hConn.Open
    IF Error THEN PRINT "Cannot Open Database. Error = "; Error.Text

See also

Charset Host Login Name Password Type