ZeosLib - open source tools for your database solutions

ZeosDBO SQL Specific Parameters

ZeosLib Development Group

05 November 2003 (Updated 29/5/2008)


Table of Contents

1. Generic Parameters
2. MySQL Driver Parameters
3. PostgreSQL Driver Parameters
4. MS SQL Driver Parameters
5. Interbase Driver Parameters

1. Generic Parameters

1.1. Connection parameters

  • defaults=[yes,no] - Calculate default values for NULL fields.

1.2. Statement parameters

  • defaults=[yes,no] - Calculate default values for NULL fields.

2. MySQL Driver Parameters

2.1. Connection parameters

  • compress=[yes,no] - Turn on/off compression protocol

  • dbless=[yes,no] - Connect to the real database or not (dbless mode)

  • useresult=[yes,no] - Fetching rows using UseResult instead StoreResult.

  • timeout=<seconds> - Connection timeout in seconds.

  • codepage=<client codepage> - Sets a client codepage. It executes a SET CHARACTER SET <client codepage> statement righ after connect. Refer your MySQL server manual for details.

  • all mysql_real_connect clientflags are now supported using the names from the enum type below. (Eg. CLIENT_MULTI_STATEMENTS=TRUE) :

    TMYSQL_CLIENT_OPTIONS =
    ( CLIENT_LONG_PASSWORD,	{  = 1;	  { new more secure passwords }
      CLIENT_FOUND_ROWS ,	{	  = 2;	  { Found instead of affected rows }
      CLIENT_LONG_FLAG	 ,	{ = 4;	  { Get all column flags }
      CLIENT_CONNECT_WITH_DB ,	{ = 8;	  { One can specify db on connect }
      CLIENT_NO_SCHEMA	 ,	{  = 16;	  { Don't allow database.table.column }
      CLIENT_COMPRESS	 ,	{  = 32;	  { Can use compression protcol }
      CLIENT_ODBC		 ,	{  = 64;	  { Odbc client }
      CLIENT_LOCAL_FILES	  ,	{ = 128;  { Can use LOAD DATA LOCAL }
      CLIENT_IGNORE_SPACE	 ,	{  = 256;  { Ignore spaces before '(' }
      CLIENT_CHANGE_USER    ,	{  = 512;  { Support the mysql_change_user() }
      CLIENT_INTERACTIVE    ,	{  = 1024; { This is an interactive client }
      CLIENT_SSL     ,	{         = 2048; { Switch to SSL after handshake }
      CLIENT_IGNORE_SIGPIPE  ,	{ = 4096; { IGNORE sigpipes }
      CLIENT_TRANSACTIONS    ,	{ = 8196; { Client knows about transactions }
      CLIENT_RESERVED     ,	{    = 16384; { Old flag for 4.1 protocol  }
      CLIENT_SECURE_CONNECTION  ,	{= 32768; { New 4.1 authentication }
      CLIENT_MULTI_STATEMENTS  ,	{= 65536; { Enable/disable multi-stmt support }
      CLIENT_MULTI_RESULTS  ,	{  = 131072; { Enable/disable multi-results }
      CLIENT_OPT_18,  {2^18 = 262144}
      CLIENT_OPT_19,{2^19 = 524288}
      CLIENT_OPT_20,  {2^20 = 1048576}
      CLIENT_OPT_21,   {2^21 = 2097152 }
      CLIENT_OPT_22,  {2^22 = 4194304}
      CLIENT_OPT_23,  {2^23 = 8388608 }
      CLIENT_OPT_24,   {2^24 = 16777216 }
      CLIENT_OPT_25,   {2^25 = 33554432}
      CLIENT_OPT_26,    {2^26 = 67108864}
      CLIENT_OPT_27,    {2^27 = 134217728}
      CLIENT_OPT_28,    {2^28 = 268435456}
      CLIENT_OPT_29,    {2^29 = 536870912}
      CLIENT_OPT_30,    {2^30 = 1073741824}
      CLIENT_REMEMBER_OPTIONS	{ = 2147483648; {Enable/disable multi-results });
              

  • all mysql_options are now supported using the names from the enum type below. (Eg. MYSQL_READ_DEFAULT_FILE=<filename>) :

      TMySqlOption = (
        MYSQL_OPT_CONNECT_TIMEOUT,
        MYSQL_OPT_COMPRESS,
        MYSQL_OPT_NAMED_PIPE,
        MYSQL_INIT_COMMAND,
        MYSQL_READ_DEFAULT_FILE,
        MYSQL_READ_DEFAULT_GROUP,
        MYSQL_SET_CHARSET_DIR,
        MYSQL_SET_CHARSET_NAME,
        MYSQL_OPT_LOCAL_INFILE,
        MYSQL_OPT_PROTOCOL,
        MYSQL_SHARED_MEMORY_BASE_NAME,
        MYSQL_OPT_READ_TIMEOUT,
        MYSQL_OPT_WRITE_TIMEOUT,
        MYSQL_OPT_USE_RESULT,
        MYSQL_OPT_USE_REMOTE_CONNECTION,
        MYSQL_OPT_USE_EMBEDDED_CONNECTION,
        MYSQL_OPT_GUESS_CONNECTION,
        MYSQL_SET_CLIENT_IP,
        MYSQL_SECURE_AUTH
      );
              

  • SSL connections are supported using this connection properties (using mysql_sll_set library call) :

        Properties.Strings = (
          'MYSQL_SSL=TRUE'
          'MYSQL_SSL_CA=D:/mysql/certs/ca-cert.pem'
          'MYSQL_SSL_CERT=D:/mysql/certs/client-cert.pem'
          'MYSQL_SSL_KEY=D:/mysql/certs/client-key.pem')
              

2.2. Statement parameters

  • useresult=[yes,no] - Fetching rows using UseResult instead StoreResult.

3. PostgreSQL Driver Parameters

3.1. Connection parameters

  • beginreq=[yes,no] - Is BEGIN required at the transaction start or not.

  • oidasblob=[yes,no] - Is Oid type treated as Large Object handle (blob) or as a regular integer.

  • timeout=<seconds> - Connection timeout in seconds.

  • codepage=<client codepage> - Sets a client codepage. It executes a SET CLIENT_ENCODING '<client codepage>' statement righ after connect.

3.2. Statement parameters

  • oidasblob=[yes,no] - Is Oid type treated as Large Object handle (blob) or as a regular integer.

4. MS SQL Driver Parameters

4.1. Connection parameters

  • appname=<application name> - The given application name is sent to sqlserver.

  • workstation=<workstation name> - The given workstation name is sent to sqlserver

  • secure=[yes,no] - This means that SQL Server will use Windows Authentication security.

  • trusted=[yes,no] - This means that SQL Server will use Windows Authentication security.

  • language=<national language name> - The given language is sent to sqlserver. If language support is installed in the server, error messages are returned in the designated national language.

  • fallback=[yes,no] - Enables or disables failover support

  • timeout=<seconds> - Is the time-out value, or the number of seconds that DB-Library waits for a login response before timing out. A time-out value of 0 represents an infinite time-out period. The default time-out value is 60 seconds.

5. Interbase Driver Parameters

5.1. Connection parameters

  • codepage=<national language name> - The given language is sent to sqlserver. If language support is installed in the server, error messages are returned in the designated national language.

  • createNewDatabase=<sql command database creation> - Created new database before open database defined in TZConnection.

  • dialect=it is parameter of Interbase/Firebird sql dialect. dialect parameter is sinonim of isc_dpb_sql_dialect parameter.

  • RoleName=it is sinonim for isc_dpb_sql_role_name parameter Interbase/Firebird. It allow set user role name to work with database and to gain the privileges of that role.

  • hard_commit=[yes,no] - Use hard commits instead of soft commits.

5.2. Statement parameters

  • cursor=<cursor name> - The given cusor name is sent to sql server.

  • cashedblob=[yes,no] - This means that blob data fetch immediate if [yes] or used interbase blob if [no].

(c) 1999 - 2006 The Zeos Development Group