ODBC: Features and Limitations

From Recital Documentation Wiki
Jump to: navigation, search

See Also

Function Summary, SQL Grammar


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.


recital

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);


Data types

All Recital data types are supported (including memos). These can be specified in the CREATE TABLE command.


Parameters

Character and binary values supplied for parameterized queries are limited to 255 bytes.


Qualifiers and owners

Qualifiers or owners are not allowed on databases or tables.


Case sensitivity

Column and table names are not case sensitive. String data comparisons are case sensitive.


Exclusive access

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.
  • Add the command set exclusive on to the config.db file. This will cause all tables to be opened exclusively.


Memo / long varchar

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.


Tracing

ODBC driver and Recital Server interaction can be debugged on the Windows client by selecting the Trace RSI calls checkbox in the SQLDriverConnect() dialog or by setting the Clientlogging and Clientlogfile parameters in the DSN on Linux.


Logging

Recital Server activity can be debugged by setting the 'logging' string in recital.ini or see recitalserver for information about starting the server with logging. The resultant files on the server can be viewed using a standard text editor.