| **Navigation:**  SQL Drivers >====== General Information for all SQL Drivers ====== | [[prop tracekey.htm|{{btn_prev_n.gif|Previous page}}]][[coming future.htm|{{btn_home_n.gif|Return to chapter overview}}]][[sql accelerator driver list.htm|{{btn_next_n.gif|Next page}}]] | | || The SQL Accelerator Drivers share many common features such as the high speed buffering technology (see //BUFFER //in the //Language Reference//), common driver strings, and SQL logging capability. \\  \\ The SQL Accelerator Drivers convert Clarion file statements and function calls into optimized SQL, which they send to the SQL server for processing.  You also have the option to send your own SQL to the backend using [[prop sql 2.htm|PROP:SQL]] or [[prop sqlrowset.htm|PROP:SQLRowSet]] **Examples:** | __**Clarion Expression**__ | __**SQL Optimization**__ | | SUB(var,1,LEN('value')) | var LIKE 'value%' | | INSTRING('value',var,1,1) <;> 0 | var LIKE '%value%' | | NULL(SQLFld) = 0 | SQLFld NOT NULL | | NULL(SQLFld) = 1 | SQLFld NULL | //var// is UPPER(SQLFld), LOWER(SQLFld), or SQLFld //SQLFld// is a field in an SQL table In addition, UPPER and LOWER are converted into the equivalent SQL function, depending on the backend used. In addition to the automatically generated SQL statements, the SQL Accelerator Drivers forward any additional SQL statements you specify to the backend SQL servers. The SQL Accelerator Driver interprets the result set returned from the SQL server and makes it available to your application program with the Clarion NEXT or PREVIOUS statement. All the common behavior of all the SQL Accelerator drivers is documented in this chapter. Driver-specific behavior is documented the chapter for that specific SQL driver. **SQL Accelerator Unique Keys** The SQL Accelerator drivers should generally be used only on tables with unique keys. The drivers will function on files without unique keys, but only with substantially limited capabilities. Without a unique key, the RESET and REGET commands return errors, and the driver cannot update the SQL database. Most Clarion templates also require that you define a primary key for each table in order to generate code.