version 1.5
OC Get function (login_ID; function_ID; 4DObject) Integer
| Parameter | Type | Description | |
| login_ID | Longint | Login ID | |
| function_ID | Integer | Reference number for function | |
| 4DObject | String | Name of the function if it is supported | |
| Function result | Integer | 1 = The function is implemented, or | |
| -1 = The function is not implemented |
Description
The OC Get function routine allows you to determine which specific ODBC functions a driver supports.
login_ID must be a valid login ID.
function_ID is the reference number of the ODBC function. A list of reference numbers follows the description of this routine.
4DObject is the name of a 4th Dimension variable or field that will accept the name of the function if it is supported.
OC Get function returns 1 if the function is implemented and -1 if the function is not implemented.
The reference numbers for functionID are as follows:
ODBC Functions at Each Level ID Implemented in 4D ODBC
Core Level
| SQL_API_SQLALLOCCONNECT | 1 | Yes |
| SQL_API_SQLALLOCENV | 2 | Yes |
| SQL_API_SQLALLOCSTMT | 3 | Yes |
| SQL_API_SQLBINDCOL | 4 | Yes |
| SQL_API_SQLCANCEL | 5 | Yes |
| SQL_API_SQLCOLATTRIBUTES | 6 | Yes |
| SQL_API_SQLCONNECT | 7 | Yes |
| SQL_API_SQLDESCRIBECOL | 8 | Yes |
| SQL_API_SQLDISCONNECT | 9 | Yes |
| SQL_API_SQLERROR | 10 | Yes |
| SQL_API_SQLEXECDIRECT | 11 | Yes |
| SQL_API_SQLEXECUTE | 12 | Yes |
| SQL_API_SQLFETCH | 13 | Yes |
| SQL_API_SQLFREECONNECT | 14 | Yes |
| SQL_API_SQLFREEENV | 15 | Yes |
| SQL_API_SQLFREESTMT | 16 | Yes |
| SQL_API_SQLGETCURSORNAME | 17 | Yes |
| SQL_API_SQLNUMRESULTCOLS | 18 | Yes |
| SQL_API_SQLPREPARE | 19 | Yes |
| SQL_API_SQLROWCOUNT | 20 | Yes |
| SQL_API_SQLSETCURSORNAME | 21 | Yes |
| SQL_API_SQLSETPARAM | 22 | Yes |
| SQL_API_SQLTRANSACT | 23 | Yes |
Level 1
| SQL_API_SQLCOLUMNS | 40 | Yes |
| SQL_API_SQLDRIVERCONNECT | 41 | |
| SQL_API_SQLGETCONNECTOPTION | 42 | Yes |
| SQL_API_SQLGETDATA | 43 | Yes |
| SQL_API_SQLGETFUNCTIONS | 44 | Yes |
| SQL_API_SQLGETINFO | 45 | Yes |
| SQL_API_SQLGETSTMTOPTION | 46 | Yes |
| SQL_API_SQLGETTYPEINFO | 47 | Yes |
| SQL_API_SQLPARAMDATA | 48 | |
| SQL_API_SQLPUTDATA | 49 | |
| SQL_API_SQLSETCONNECTOPTION | 50 | Yes |
| SQL_API_SQLSETSTMTOPTION | 51 | Yes |
| SQL_API_SQLSPECIALCOLUMNS | 52 | |
| SQL_API_SQLSTATISTICS | 53 | |
| SQL_API_SQLTABLES | 54 | Yes |
Level 2
| SQL_API_SQLBROWSECONNECT | 55 | |
| SQL_API_SQLCOLUMNPRIVILEGES | 56 | Yes |
| SQL_API_SQLDATASOURCES | 57 | Yes |
| SQL_API_SQLDESCRIBEPARAM | 58 | Yes |
| SQL_API_SQLEXTENDEDFETCH | 59 | |
| SQL_API_SQLFOREIGNKEYS | 60 | |
| SQL_API_SQLMORERESULTS | 61 | Yes |
| SQL_API_SQLNATIVESQL | 62 | |
| SQL_API_SQLNUMPARAMS | 63 | Yes |
| SQL_API_SQLPARAMOPTIONS | 64 | |
| SQL_API_SQLPRIMARYKEYS | 65 | Yes |
| SQL_API_SQLPROCEDURECOLUMNS | 66 | Yes |
| SQL_API_SQLPROCEDURES | 67 | Yes |
| SQL_API_SQLSETPOS | 68 | |
| SQL_API_SQLSETSCROLLOPTIONS | 69 | |
| SQL_API_SQLTABLEPRIVILEGES | 70 | Yes |
SDK 2.0 Additions
| SQL_API_SQLDRIVERS | 71 | |
| SQL_API_SQLBINDPARAMETER | 72 |
Example
The following method queries the user for a function ID number and returns the name of the function if it is implemented.
C_STRING(30;var1)
$num:=Request("Enter ID #")
$res:=OC Get function (login;Num($num);var1)
If ($res=1)
ALERT(var1+" is Implemented")
Else
ALERT ("Not Implemented")
End if