ODBC: Features and Limitations

From Recital Documentation Wiki
Revision as of 10:09, 26 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Supported ODBC SQL data types

fSqlType Recital/SQL Data Type
SQL_CHAR CHAR(n)
SQL_VARCHAR VARCHAR(n)
SQL_LONGVARCHAR LONG VARCHAR
SQL_NUMERIC DECIMAL(precision, scale)
SQL_NUMERIC NUMERIC(precision, scale)
SQL_NUMERIC SMALLINT
SQL_INTEGER INTEGER
SQL_REAL REAL
SQL_FLOAT FLOAT
SQL_NUMERIC DOUBLE PRECISION
SQL_BIT BIT
SQL_TINYINT TINYINT
SQL_NUMERIC BIGINT
SQL_SHORT SHORT(precision, scale)
SQL_DATE DATE
SQL_BIT LOGICAL
SQL_LONGVARCHAR MEMO
SQL_NUMERIC BYTE
SQL_LONGVARBINARY OBJECT
SQL_DATETIME DATETIME
SQL_CURRENCY CURRENCY
SQL_ZONED ZONED

Query optimization

  • Full query optimization is supported on the server using "index restriction" query optimization. Make sure you have the required indexes set up.
  • You can execute any Recital non user-interface command from the ODBC driver by prefixing the command in SQLExecute() or SQLExecDirect() with the keyword 'recital'. For example:

SQLExecDirect(hstmt, "recital do myproc", cbSqlStr);

  • Any output can then be accessed using SQLFetch() calls. You can control shared access with this command. For example:

SQLExecDirect(hstmt, "recital set exclusive off", cbSqlStr);

  • All Recital data types are supported (including memos). These can be specified in the CREATE TABLE command.
  • Character and binary values supplied for parameterized queries are limited to 255 bytes.
  • Qualifiers or owners are not allowed on databases or tables.
  • Column and table names are not case sensitive. String data comparisons are case sensitive.
  • By default all tables are opened shareable on the server. If you do not want this then:
  • Call SQLExecute(hstmt, "recital set exclusive on") before opening a table.
  • Set the 'useoptions' string in the sysodbc.ini file on the server to 'exclusive' for each table that you require non-shareable access to. See the UAS Installation and Configuration Guide for more information about sysodbc.ini.
  • Add the command 'set exclusive on' to the config.db file. This will cause all tables to be opened exclusively. See the UAS Installation and Configuration Guide for more information about config.db.
  • Memo fields are seen as SQL 'LONG VARCHAR' columns, and default to a maximum of 64k characters. This can be altered by setting the 'maxvarcharsize' entry in recital.ini on the client to the required value. Be careful when making this too large as performance will be unduly affected. The recital.ini file should reside in the <WINDOWS> directory.
  • ODBC driver and Recital Universal Data and Application Server interaction can be debugged on the client by selecting the 'Trace RSI calls' checkbox in the SQLDriverConnect() dialog.
  • ODBC server activity can be debugged by setting the 'logging' string in 'recital.ini' or see the UAS Installation and Configuration Guide for information about setting up logging on the server. The resultant file on the server can be viewed using a standard text editor.