Function.ODBC.Connection!ConnectionName.OpenConnection

From GAB Help
Jump to: navigation, search

Opens a connection to a database

Syntax

Function.ODBC.Connection!ConnectionName.OpenConnection (DSN Name, UserName, Password) or

Function.ODBC.Connection!connection_name.OpenConnection(DSN, username, password, timeout) or

Function.ODBC.Connection!connection_name.OpenConnection(Connection string) or

Function.ODBC.Connection!connection_name.OpenConnection(DSN)

Arguments

Connection Name

The name of the connection

DSNName

The name of the DSN (Database) on the computer

UserName

Default use “Admin”

Password

Default use “”

Example

Function.ODBC.Connection!testConnect.OpenConnection (“GLOBAL_GSS”, “Master”, master“”)

Remarks

  • The timeout value is in seconds
  • This only affects the timeout of commands that execute against the database directly (UPDATE, DELETE, INSERT INTO, etc.)
  • This isn't a bug fix, per se, but some ODBC commands executing against the Pervasive database engine will exceed the command timeout. When this happens, a S100 Timeout Expired fault will be thrown.
  • This command can be used if you have a properly formatted connection string, or if you want to use NTLM security with your DSN.
  • If you are using a DSN with this command, you will need to manually check for its presence.