Clarion ODBC Driver Properties
ODBC:Driver Properties You can use Clarion's property syntax to query and set certain SQL Accelerator driver properties. These properties are described below. In addition to the standard SQL Driver properties, the ODBC Accelerator Driver supports the following properties: PROP:hdbc PROP:hdbc returns the current hdbc used by the ODBC driver. Thus ?MyFile{PROP:hdbc} may be used for ODBC API calls requiring hdbc. PROP:henv PROP:henv returns the current henv used by the ODBC driver. Thus ?MyFile{PROP:henv} may be used for ODBC API calls requiring henv. For example, the SQLDescribeCol function: rc# = SQLDataSources(Myfile{PROP:henv},SQL_FETCH_NEXT,ODBC:driver, | drvLen,drvlen,ODBC:Description,desclen,desclen) PROP:hstmt PROP:hstmt returns the current hstmt used by the ODBC driver. Thus ?MyFile{PROP:hstmt} may be used for ODBC API calls requiring hstmt. For example, the SQLDescribeCol function: Myfile{PROP:SQL} = 'Select * from ATable' rc# = SQLDescribeCol(Myfile{PROP:hstmt},Num,Name,Max,NameL, | Type,Def,Scale,Null) PROP:LoginTimeout PROP:LoginTimeout sets a time limit in seconds for an SQL database's login screen. If the user does not respond in the allotted time, the connection fails and the login is aborted. The default is to wait indefinitely for user input. Some servers do not support this feature and may ignore the instruction. For example: AFile FILE,DRIVER('ODBC'),OWNER('DataSource') CODE OPEN(Afile) IF NOT ERRORCODE() AFile{PROP:LoginTimeOut}=60 !allow 1 minute for login END PROP:QuoteString PROP:QuoteString sets or returns the column name delimiter (typically a quote) the ODBC Accelerator Driver uses to surround column names within its generated SQL statements. Different backends require different delimiter characters. You can use PROP:QuoteString to build your own dynamic SQL statements. Note that you must enclose any column names that are also SQL reserved words in the correct delimiter character. See Using Embedded SQL. Some backends do not correctly return the delimiter character. For those backends you should set the value of PROP:QuoteString before using it. |

