80 lines
15 KiB
HTML

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ZeosDBO SQL Specific Parameters</title><link rel="stylesheet" href="ede.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.0"></head><body><div xmlns="" id="customheader"><a href="http://zeos.firmos.at/portal.php" style="color: #fff; font-weight: bold;">ZeosLib</a><b> - open source tools for your database solutions</b></div><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="d4e1"></a>ZeosDBO SQL Specific Parameters</h1></div><div><h3 class="corpauthor">ZeosLib Development Group</h3></div><div><p class="pubdate">05 November 2003 (Updated 29/5/2008)</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#d4e6">1. Project options</a></span></dt><dt><span class="sect1"><a href="#d4e29">2. Generic Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e43">3. MySQL Driver Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e72">4. PostgreSQL Driver Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e96">5. MS SQL Driver Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e115">6. Interbase Driver Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e137">7. Oracle Driver Parameters</a></span></dt><dt><span class="sect1"><a href="#d4e144">8. SQLite Driver Parameters</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e6"></a>1.&nbsp;Project options</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e8">1.1. Conditional Defines</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e8"></a>1.1.&nbsp;Conditional Defines</h3></div></div></div><p>It is possible to avoid databasedrivers are compiled into your program executable if you're not planning to support the use of them. You can do this by commenting out the ENABLE_XXXX DEFINES in zeos.inc before compiling and installing zeoslib.</p><p>A more flexible way is to install zeoslib using the standard zeos.inc file and add some conditional DEFINE's to your project options. Supported values are:
<div class="itemizedlist"><ul type="disc"><li>ZEOS_DISABLE_MYSQL</li><li>ZEOS_DISABLE_ORACLE</li><li>ZEOS_DISABLE_SQLITE</li><li>ZEOS_DISABLE_ASA</li><li>ZEOS_DISABLE_INTERBASE</li><li>ZEOS_DISABLE_DBLIB</li><li>ZEOS_DISABLE_POSTGRESQL</li><li>ZEOS_DISABLE_ADO</li></ul></div>
To use this feature you must add the zeoslib source dir's to the search path of your project. So only the required features will be compiled in your project executable. (Make sure the zeoslib units are recompiled as well)
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e29"></a>2.&nbsp;Generic Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e31">2.1. Connection parameters</a></span></dt><dt><span class="sect2"><a href="#d4e36">2.2. ZQuery parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e31"></a>2.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>defaults=[yes,no] - Calculate default values for NULL fields.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e36"></a>2.2.&nbsp;ZQuery parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>defaults=[yes,no] - Calculate default values for NULL fields.</p></li><li><p>ValidateUpdateCount=[true,false] - Check if automatically generated updates of ZUpdateSQL updates only affect 1 record.</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e43"></a>3.&nbsp;MySQL Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e45">3.1. Connection parameters</a></span></dt><dt><span class="sect2"><a href="#d4e67">3.2. Statement parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e45"></a>3.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>compress=[yes,no] - Turn on/off compression protocol</p></li><li><p>dbless=[yes,no] - Connect to the real database or not (dbless mode)</p></li><li><p>useresult=[yes,no] - Fetching rows using UseResult instead StoreResult.</p></li><li><p>timeout=&lt;seconds&gt; - Connection timeout in seconds.</p></li><li><p>codepage=&lt;client codepage&gt; - Sets a client codepage. It executes a SET CHARACTER SET &lt;client codepage&gt; statement righ after connect. Refer your MySQL server manual for details.</p></li><li><p>all mysql_real_connect clientflags are now supported using the names from the enum type below. (Eg. CLIENT_MULTI_STATEMENTS=TRUE) :
<pre class="programlisting">
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 });
</pre>
</p></li><li><p>all mysql_options are now supported using the names from the enum type below. (Eg. MYSQL_READ_DEFAULT_FILE=&lt;filename&gt;) :
<pre class="programlisting">
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
);
</pre>
</p></li><li><p>SSL connections are supported using this connection properties (using mysql_sll_set library call) :
<pre class="programlisting">
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')
</pre>
</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e67"></a>3.2.&nbsp;Statement parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>useresult=[yes,no] - Fetching rows using UseResult instead StoreResult.</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e72"></a>4.&nbsp;PostgreSQL Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e74">4.1. Connection parameters</a></span></dt><dt><span class="sect2"><a href="#d4e91">4.2. Statement parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e74"></a>4.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>beginreq=[yes,no] - Is BEGIN required at the transaction start or not.</p></li><li><p>oidasblob=[yes,no] - Is Oid type treated as Large Object handle (blob) or as a regular integer.</p></li><li><p>timeout=&lt;seconds&gt; - Connection timeout in seconds.</p></li><li><p>codepage=&lt;client codepage&gt; - Sets a client codepage. It executes a SET CLIENT_ENCODING '&lt;client codepage&gt;' statement righ after connect.</p></li><li><p>sslmode=[disable, allow, prefer, require] - (From PostgreSQL docs:) This option determines whether or with what priority an SSL connection will be negotiated with the server. There are four modes: disable will attempt only an unencrypted SSL connection; allow will negotiate, trying first a non-SSL connection, then if that fails, trying an SSL connection; prefer (the default) will negotiate, trying first an SSL connection, then if that fails, trying a regular non-SSL connection; require will try only an SSL connection.
If PostgreSQL is compiled without SSL support, using option require will cause an error, while options allow and prefer will be accepted but libpq will not in fact attempt an SSL connection.</p></li><li><p>requiressl=[0,1] - This option is deprecated in favor of the sslmode setting.</p></li><li><p>application_name=&lt;application name&gt; - (From PostgreSQL docs:) This option is typically set by an application upon connection to the server. The name will be displayed in the pg_stat_activity view and included in CSV log entries.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e91"></a>4.2.&nbsp;Statement parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>oidasblob=[yes,no] - Is Oid type treated as Large Object handle (blob) or as a regular integer.</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e96"></a>5.&nbsp;MS SQL Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e98">5.1. Connection parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e98"></a>5.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>appname=&lt;application name&gt; - The given application name is sent to sqlserver.</p></li><li><p>workstation=&lt;workstation name&gt; - The given workstation name is sent to sqlserver</p></li><li><p>secure=[yes,no] - This means that SQL Server will use Windows Authentication security.</p></li><li><p>trusted=[yes,no] - This means that SQL Server will use Windows Authentication security.</p></li><li><p>language=&lt;national language name&gt; - The given language is sent to sqlserver. If language support is installed in the server, error messages are returned in the designated national language.</p></li><li><p>fallback=[yes,no] - Enables or disables failover support</p></li><li><p>timeout=&lt;seconds&gt; - 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.</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e115"></a>6.&nbsp;Interbase Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e117">6.1. Connection parameters</a></span></dt><dt><span class="sect2"><a href="#d4e130">6.2. Statement parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e117"></a>6.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>codepage=&lt;national language name&gt; - The given language is sent to sqlserver. If language support is installed in the server, error messages are returned in the designated national language.</p></li><li><p>createNewDatabase=&lt;sql command database creation&gt; - Created new database before open database defined in TZConnection.</p></li><li><p>dialect=it is parameter of Interbase/Firebird sql dialect. dialect parameter is sinonim of isc_dpb_sql_dialect parameter.</p></li><li><p>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.</p></li><li><p>hard_commit=[yes,no] - Use hard commits instead of soft commits.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e130"></a>6.2.&nbsp;Statement parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>cursor=&lt;cursor name&gt; - The given cusor name is sent to sql server.</p></li><li><p>cashedblob=[yes,no] - This means that blob data fetch immediate if [yes] or used interbase blob if [no].</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e137"></a>7.&nbsp;Oracle Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e139">7.1. Connection parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e139"></a>7.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>codepage=[utf8,UTF8,0..max word value] - The codepage used by the oracle OCI to interprete strings sent to the server. For Lazarus this should be set to UTF8.</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d4e144"></a>8.&nbsp;SQLite Driver Parameters</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="#d4e146">8.1. Connection parameters</a></span></dt></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="d4e146"></a>8.1.&nbsp;Connection parameters</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>busytimeout=&lt;milliseconds&gt; - Timeout before throwing an error because the database to be opened is locked</p></li></ul></div></div></div></div><div xmlns="" id="customfooter">
(c) 1999 - 2006 The Zeos Development Group
</div></body></html>