ConnectOCL
Connects the user to an Oracle Clinical database in either Production or Test mode.
Syntax
short int ConnectOCL(char
*user
,char
*password
,
char
*database
,
short int
mode
,
double
*sessionid
);
Parameters
user
(in) The OCL database user name.
password
(in) The OCL database user password.
database
(in) The OCL database name.
mode
(in)
- Either
OCL_TEST
orOCL_PROD
for a standalone application. - Either
2
(Production) or3
(Test) to share the same database session.
Note:
In Oracle Clinical on Forms 10g (4.6 and higher), when invoking this function to share the same database session that is used by Oracle Forms, use a mode value of 2
for Production and 3
for Test mode. When invoking the function from a standalone application (not via Oracle Forms), use a mode value of OCL_PROD
for Production and OCL_TEST
for Test mode.
sessionid
(out) The session ID for the current session.
Return Value
SUCCESS
or FAILURE
or WARNING
.
Comments
None.
Error Messages
Table 7-2 Error Messages for ConnectOCL
Number | Severity | Message |
---|---|---|
284900 |
ERR |
User does not have the privilege to call function in the current mode. |
285000 |
ERR |
Function called out of sequence. |
285700 |
ERR |
An open database connection already exists. Use DisconnectOCL to close the connection. |
297000 |
ERR |
Null or invalid input parameters provided. |
302200 |
ERR |
Mode should be OCL_PROD or OCL_TEST. NOTE: A mode value of 2 should be used for Production and 3 for Test mode when invoking the ConnectOCL DCAPI function to share the same database session. |
303800 |
ERR |
Cannot find location_code in the reference codelist for the current connection. |
304900 |
WRN |
User has been granted too many roles: exceeds the maximum allowed. |
305000 |
WRN |
Too many messages. |
Related Functions
Parent topic: Data Capture API Functions