Description
Creates a Connection Object instance and returns the handle.
Syntax
hXO = XOInstance (sourcename, sourcetype, loginID, password, timeout, options, scope)
Parameters
The XOInstance function has the following parameters:
| Parameter | Description |
|---|---|
| Sourcename | OpenInsight data source name. |
| Sourcetype | Data source type. |
| LoginID | User name used to connect to the data source. |
| Password | Password used to connect to the data source. |
| Timeout | Number of seconds to wait for a connection. |
| Options | A bit-masked number that specifies connection options. Select one from each group. |
| Group | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Transactions | Specifies whether transactions will be used.
| ||||||||||||
| Shareable | Allows the caller to either share connections (to minimize the number of open connections) or specify a connection "not shared" (to minimize the possibility of interference between processes).
| ||||||||||||
| Login Dialog | Determines whether the Login dialog box will be used to collect login information.
| ||||||||||||
| Resolve Parameters | Allows XOInstance() to fill in unspecified parameters using system defaults and previously entered information.
| ||||||||||||
| Scope | If the XO_SCOPEDSHARE$ option is specified, this parameter defines the name by which the Connection Object will be shared. |
Returns
Handle to the Connection Object.
Remarks
/* If the system connection default is not set to XO_NODIALOG$
then this will prompt the user for connection information and return the Connection Object. */
hXO = XOInstance()
/* Attempts to connect to the ODBC data source: "CUSTOMER" using the specified login and password, and default timeout. */
hXO = XOInstance ("CUSTOMER", "ODBC", login, pwd, "", |
XO_USETRANS$ + XO_GLOBALSHARE$ + XO_NODIALOG$ + XO_NORESOLVE$)