Author: mcbrown
Date: 2007-11-13 12:22:22 +0100 (Tue, 13 Nov 2007)
New Revision: 8670
Log:
Connector/NET Reformat:
- Moved up the Connection parameters to the start of the section
- Added a highlight to the connection section to the opening page
- Added an FAQ section
Connector/ODBC reformat:
- Moved up the connection parameters to the start of the section
- Added new parameter
- Some other typos and other updates
Connector/NET Bugs:
Bug #31262
Bug #31930
Bug #27958
Bug #29877
Bug #31703
Bug #32010
Bug #30964
Bug #31090
Bug #31185
Bug #31433
Bug #31731
Bug #32093
Bug #32094
Bug #13991
Bug #27959
Bug #30116
Bug #26344
Bug #27436
Modified:
trunk/dynamic-docs/changelog/connector-net-versions.xml
trunk/dynamic-docs/changelog/connector-net.xml
trunk/refman-common/connector-net.xml
trunk/refman-common/connector-odbc.xml
trunk/refman-common/news-cnet-core.xml
Modified: trunk/dynamic-docs/changelog/connector-net-versions.xml
===================================================================
--- trunk/dynamic-docs/changelog/connector-net-versions.xml 2007-11-13 03:15:50 UTC (rev 8669)
+++ trunk/dynamic-docs/changelog/connector-net-versions.xml 2007-11-13 11:22:22 UTC (rev 8670)
Changed blocks: 2, Lines Added: 4, Lines Deleted: 0; 954 bytes
@@ -3,6 +3,8 @@
<versionlog>
<mysqlproductname title="MySQL Connector/NET"/>
+ <versionentry ver="5.2.0" reldate="Not yet released"></versionentry>
+ <versionentry ver="5.1.4" reldate="Not yet released"></versionentry>
<versionentry ver="5.1.3" rellevel="beta" reldate="21 September 2007">
<versionentrypreamble>
@@ -41,6 +43,8 @@
</versionentry>
<versionentry ver="5.1.0" reldate="01 May 2007"/>
+ <versionentry ver="5.0.9" reldate="Not yet released"></versionentry>
+ <versionentry ver="5.0.8.1" reldate="21 August 2007"></versionentry>
<versionentry ver="5.0.8" reldate="21 August 2007">
<versionentrypreamble>
Modified: trunk/dynamic-docs/changelog/connector-net.xml
===================================================================
--- trunk/dynamic-docs/changelog/connector-net.xml 2007-11-13 03:15:50 UTC (rev 8669)
+++ trunk/dynamic-docs/changelog/connector-net.xml 2007-11-13 11:22:22 UTC (rev 8670)
Changed blocks: 2, Lines Added: 452, Lines Deleted: 2; 9073 bytes
@@ -2,9 +2,459 @@
<!DOCTYPE changelog SYSTEM "changelog.dtd">
<changelog>
+ <logentry entrytype="feature">
+
+ <versions>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Added ClearPool and ClearAllPools features.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="feature">
+
+ <versions>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ DDEX provider now works under Visual Studio 2008 beta 2.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="feature">
+
+ <versions>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Added support for <literal>DbDataAdapter</literal>
+ <literal>UpdateBatchSize</literal>. Batching is fully supported
+ including collapsing inserts down into the multi-value form if
+ possible.
+ </para>
+
+ </message>
+
+ </logentry>
+
<logentry entrytype="bug">
<bugs>
+ <fixes bugid="31262"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Trying to use a connection that was not open could return an
+ ambiguous and misleading error message.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31930"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ A syntax error in a set of batch statements could leave the data
+ adapter in a state that appears hung.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="27958"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ When accessing certain statements, the command would timeout
+ before the command completed. Because this cannot always be
+ controlled through the individual command timeout options, a
+ <literal>default command timeout</literal> has been added to the
+ connection string options.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31703"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Connector/NET would incorrectly report success when enlisting in
+ a distributed transaction, although distributed transactions are
+ not supported.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="32010"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ A date string could be returned incorrectly by
+ <literal>MySqlDataTime.ToString()</literal> when the date
+ returned by MySQL was <literal>0000-00-00 00:00:00</literal>.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="30964"/>
+ </bugs>
+
+ <versions>
+ <version ver="1.0.11"/>
+ <version ver="5.0.9"/>
+ <version
+ ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Commands executed from within the state change handeler would
+ fail with a <literal>NULL</literal> exception.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31090"/>
+ </bugs>
+
+ <versions>
+ <version ver="1.0.11"/>
+ <version ver="5.0.9"/>
+ <version
+ ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Memory usage could increase and decrease significantly when
+ updating or inserting a large number of rows.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31185"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Column name metadata was not using the character set as deifned
+ within the connection string being used.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31433"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Data cached from the connection string could return invalid
+ information because the internal routines were not using
+ case-sensitive semantics. This lead to updated connection string
+ options not being recognized if they were of a different case
+ than the existing cached values.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="31731"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Installing over a failed uninstall of a previous version could
+ result in multiple clients being registered in the
+ <literal>machine.config</literal>. This would prevent certain
+ aspects of the MySQL connection within Visual Studio to work
+ properly.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="32093"/>
+ </bugs>
+
+ <versions>
+ <version ver="1.0.11"/>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Creation of parameter objects with non-input direction using a
+ constructor would fail. This was cause by some old legacy code
+ preventing their use.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="32094"/>
+ </bugs>
+
+ <versions>
+ <version ver="1.0.11"/>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Setting the size of a string parameter after the value could
+ cause an exception.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="13991"/>
+ </bugs>
+
+ <versions>
+ <version ver="1.0.11"/>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Changing the connection string of a connection to one that
+ changes the parameter marker after the connection had been
+ assigned to a command but before the connection is opened could
+ cause parameters to not be found.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="27959"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ Column types with only 1-bit (such as <literal>BOOLEAN</literal>
+ and <literal>TINYINT(1)</literal> were not returned as boolean
+ fields.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="30116"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ When running a stored procedure multiple times on the same
+ connection, the memory usage could increase indefinitely.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="26344"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.4"/>
+ <version ver="5.2.0"/>
+ </versions>
+
+ <message>
+
+ <para>
+ The <literal>MySqlDbType.Datetime</literal> has been replaced
+ with MySqlDbType.DateTime. The old format has been obsoleted.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
+ <fixes bugid="27436"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.0.9"/>
+ <version ver="5.1.4"/>
+ </versions>
+
+ <message>
+
+ <para>
+ The server error code was not updated in the
+ <literal>Data[]</literal> hash, which prevented
+ <literal>DbProviderFactory</literal> users from accessing the
+ server error code.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <bugs>
<fixes bugid="13753"/>
</bugs>
@@ -5359,8 +5809,8 @@
<message>
<para>
- <literal>DESCRIBE ....</literal> SQL statement returns byte arrays
- rather than data on MySQL versions older than 4.1.15.
+ <literal>DESCRIBE ....</literal> SQL statement returns byte
+ arrays rather than data on MySQL versions older than 4.1.15.
</para>
</message>
Modified: trunk/refman-common/connector-net.xml
===================================================================
--- trunk/refman-common/connector-net.xml 2007-11-13 03:15:50 UTC (rev 8669)
+++ trunk/refman-common/connector-net.xml 2007-11-13 11:22:22 UTC (rev 8670)
Changed blocks: 7, Lines Added: 623, Lines Deleted: 520; 51906 bytes
@@ -120,6 +120,23 @@
</para>
</note>
+ <para>
+ <emphasis role="bold">Key topics:</emphasis>
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ For connection string properties when using the
+ <classname>MySqlConnection</classname> class, see
+ <xref
+ linkend="connector-net-examples-mysqlconnection-connectionstring"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
<section id="connector-net-versions">
<title>Connector/NET Versions</title>
@@ -2786,6 +2803,525 @@
</section>
+ <section id="connector-net-examples-mysqlconnection-connectionstring">
+
+ <title>ConnectionString</title>
+
+ <para>
+ Gets or sets the string used to connect to a MySQL Server
+ database.
+ </para>
+
+ <para>
+ The <literal>ConnectionString</literal> returned may not be
+ exactly like what was originally set but will be indentical in
+ terms of keyword/value pairs. Security information will not be
+ included unless the Persist Security Info value is set to
+ true.
+ </para>
+
+ <para>
+ You can use the <literal>ConnectionString</literal> property
+ to connect to a database. The following example illustrates a
+ typical connection string.
+ </para>
+
+<programlisting>"Persist Security Info=False;database=MyDB;»
+ server=MySqlServer;user id=myUser;Password=myPass"</programlisting>
+
+ <para>
+ The <literal>ConnectionString</literal> property can be set
+ only when the connection is closed. Many of the connection
+ string values have corresponding read-only properties. When
+ the connection string is set, all of these properties are
+ updated, except when an error is detected. In this case, none
+ of the properties are updated.
+ <literal>MySqlConnection</literal> properties return only
+ those settings contained in the
+ <literal>ConnectionString</literal>.
+ </para>
+
+ <para>
+ To connect to a local machine, specify "localhost" for the
+ server. If you do not specify a server, localhost is assumed.
+ </para>
+
+ <para>
+ Resetting the <literal>ConnectionString</literal> on a closed
+ connection resets all connection string values (and related
+ properties) including the password. For example, if you set a
+ connection string that includes "Database= MyDb", and then
+ reset the connection string to "Data Source=myserver;User
+ Id=myUser;Password=myPass", the
+ <literal>MySqlConnection.Database</literal> property is no
+ longer set to MyDb.
+ </para>
+
+ <para>
+ The connection string is parsed immediately after being set.
+ If errors in syntax are found when parsing, a runtime
+ exception, such as <literal>ArgumentException</literal>, is
+ generated. Other errors can be found only when an attempt is
+ made to open the connection.
+ </para>
+
+ <para>
+ The basic format of a connection string consists of a series
+ of keyword/value pairs separated by semicolons. The equal sign
+ (<literal>=</literal>) connects each keyword and its value.
+ Additional notes on setting values for options:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ To include values that contain a semicolon, single-quote
+ character, or double-quote character, the value must be
+ enclosed in double quotes. If the value contains both a
+ semicolon and a double-quote character, the value can be
+ enclosed in single quotes. The single quote is also useful
+ if the value begins with a double-quote character.
+ Conversely, the double quote can be used if the value
+ begins with a single quote. If the value contains both
+ single-quote and double-quote characters, the quote
+ character used to enclose the value must be doubled each
+ time it occurs within the value.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To include preceding or trailing spaces in the string
+ value, the value must be enclosed in either single quotes
+ or double quotes. Any leading or trailing spaces around
+ integer, Boolean, or enumerated values are ignored, even
+ if enclosed in quotes. However, spaces within a string
+ literal keyword or value are preserved. Using .NET
+ Framework version 1.1, single or double quotes may be used
+ within a connection string without using delimiters (for
+ example, Data Source= my'Server or Data Source=
+ my"Server), unless a quote character is the first or last
+ character in the value.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To include an equal sign (=) in a keyword or value, it
+ must be preceded by another equal sign. For example, in
+ the hypothetical connection string
+ </para>
+
+<programlisting>"key==word=value"</programlisting>
+
+ <para>
+ the keyword is "key=word" and the value is "value".
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ If a specific keyword in a keyword= value pair occurs
+ multiple times in a connection string, the last occurrence
+ listed is used in the value set.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Keywords are not case sensitive.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ The following table lists the valid names for keyword values
+ within the <literal>ConnectionString</literal>.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="10*"/>
+ <colspec colwidth="55*"/>
+ <tbody>
+ <row>
+ <entry>Name</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ <row>
+ <entry><literal>Connect Timeout</literal>, <literal>Connection
+ Timeout</literal></entry>
+ <entry>15</entry>
+ <entry>The length of time (in seconds) to wait for a connection to the server
+ before terminating the attempt and generating an
+ error.</entry>
+ </row>
+ <row>
+ <entry><literal>Host</literal>, <literal>Server</literal>, <literal>Data
+ Source</literal>, <literal>DataSource</literal>,
+ <literal>Address</literal>, <literal>Addr</literal>,
+ <literal>Network Address</literal></entry>
+ <entry>localhost</entry>
+ <entry>The name or network address of the instance of MySQL to which to
+ connect. Multiple hosts can be specified separated by
+ &. This can be useful where multiple MySQL servers
+ are configured for replication and you are not
+ concerned about the precise server you are connecting
+ to. No attempt is made by the provider to synchronize
+ writes to the database so care should be taken when
+ using this option. In Unix environment with Mono, this
+ can be a fully qualified path to MySQL socket
+ filename. With this configuration, the Unix socket
+ will be used instead of TCP/IP socket. Currently only
+ a single socket name can be given so accessing MySQL
+ in a replicated environment using Unix sockets is not
+ currently supported.</entry>
+ </row>
+ <row>
+ <entry><literal>Ignore Prepare</literal></entry>
+ <entry>true</entry>
+ <entry>When true, instructs the provider to ignore any calls to
+ <literal>MySqlCommand.Prepare()</literal>. This option
+ is provided to prevent issues with corruption of the
+ statements when use with server side prepared
+ statements. If you want to use server-side prepare
+ statements, set this option to false. This option was
+ added in Connector/NET 5.0.3 and Connector/NET 1.0.9.</entry>
+ </row>
+ <row>
+ <entry><literal>Port</literal></entry>
+ <entry>3306</entry>
+ <entry>The port MySQL is using to listen for connections. Specify -1 for this
+ value to use a named pipe connection (Windows only).
+ This value is ignored if Unix socket is used.</entry>
+ </row>
+ <row>
+ <entry><literal>Protocol</literal></entry>
+ <entry>socket</entry>
+ <entry>Specifies the type of connection to make to the server.Values can be:
+ socket or tcp for a socket connection pipe for a named
+ pipe connection unix for a Unix socket connection
+ memory to use MySQL shared memory</entry>
+ </row>
+ <row>
+ <entry><literal>CharSet</literal>, <literal>Character Set</literal></entry>
+ <entry/>
+ <entry>Specifies the character set that should be used to encode all queries
+ sent to the server. Resultsets are still returned in
+ the character set of the data returned.</entry>
+ </row>
+ <row>
+ <entry><literal>Logging</literal></entry>
+ <entry>false</entry>
+ <entry>When true, various pieces of information is output to any configured
+ TraceListeners.</entry>
+ </row>
+ <row>
+ <entry><literal>Allow Batch</literal></entry>
+ <entry>true</entry>
+ <entry>When true, multiple SQL statements can be sent with one command
+ execution. -Note- Starting with MySQL 4.1.1, batch
+ statements should be separated by the server-defined
+ seperator character. Commands sent to earlier versions
+ of MySQL should be seperated with ';'.</entry>
+ </row>
+ <row>
+ <entry><literal>Encrypt</literal></entry>
+ <entry>false</entry>
+ <entry>For Connector/NET 5.0.3 and later, when <literal>true</literal>, SSL
+ encryption is used for all data sent between the
+ client and server if the server has a certificate
+ installed. Recognized values are
+ <literal>true</literal>, <literal>false</literal>,
+ <literal>yes</literal>, and <literal>no</literal>. In
+ versions before 5.0.3, this option had no effect.</entry>
+ </row>
+ <row>
+ <entry><literal>Initial Catalog</literal>, <literal>Database</literal></entry>
+ <entry>mysql</entry>
+ <entry>The name of the database to use intially</entry>
+ </row>
+ <row>
+ <entry><literal>Password</literal>, <literal>pwd</literal></entry>
+ <entry/>
+ <entry>The password for the MySQL account being used.</entry>
+ </row>
+ <row>
+ <entry><literal>Persist Security Info</literal></entry>
+ <entry>false</entry>
+ <entry>When set to <literal>false</literal> or <literal>no</literal> (strongly
+ recommended), security-sensitive information, such as
+ the password, is not returned as part of the
+ connection if the connection is open or has ever been
+ in an open state. Resetting the connection string
+ resets all connection string values including the
+ password. Recognized values are
+ <literal>true</literal>, <literal>false</literal>,
+ <literal>yes</literal>, and <literal>no</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>User Id</literal>, <literal>Username</literal>,
+ <literal>Uid</literal>, <literal>User name</literal></entry>
+ <entry/>
+ <entry>The MySQL login account being used.</entry>
+ </row>
+ <row>
+ <entry><literal>Shared Memory Name</literal></entry>
+ <entry>MYSQL</entry>
+ <entry>The name of the shared memory object to use for communication if the
+ connection protocol is set to memory.</entry>
+ </row>
+ <row>
+ <entry><literal>Allow Zero Datetime</literal></entry>
+ <entry>false</entry>
+ <entry>True to have MySqlDataReader.GetValue() return a MySqlDateTime for date
+ or datetime columns that have illegal values. False
+ will cause a <literal>System.DateTime</literal> object
+ to be returned for legal values and an exception will
+ be thrown for illegal values.</entry>
+ </row>
+ <row>
+ <entry><literal>Convert Zero Datetime</literal></entry>
+ <entry>false</entry>
+ <entry>True to have <literal>MySqlDataReader.GetValue()</literal> and
+ <literal>MySqlDataReader.GetDateTime()</literal>
+ return DateTime.MinValue for date or datetime columns
+ that have illegal values.</entry>
+ </row>
+ <row>
+ <entry><literal>Old Syntax</literal>, <literal>OldSyntax</literal></entry>
+ <entry>false</entry>
+ <entry>Allows use of '@' symbol as a parameter marker. See
+ <literal>MySqlCommand</literal> for more info. This is
+ for compatibility only. All future code should be
+ written to use the new '?' parameter marker.</entry>
+ </row>
+ <row>
+ <entry><literal>Pipe Name</literal>, <literal>Pipe</literal></entry>
+ <entry>mysql</entry>
+ <entry>When set to the name of a named pipe, the
+ <literal>MySqlConnection</literal> will attempt to
+ connect to MySQL on that named pipe.This settings only
+ applies to the Windows platform.</entry>
+ </row>
+ <row>
+ <entry><literal>Procedure Cache</literal></entry>
+ <entry>25</entry>
+ <entry>Sets the size of the stored procedure cache. By default, Connector/NET
+ will store the metadata (input/output datatypes) about
+ the last 25 stored procedures used. To disable the
+ stored procedure cache, set the value to zero (0).
+ This option was added in Connector/NET 5.0.2 and
+ Connector/NET 1.0.9.</entry>
+ </row>
+ <row>
+ <entry><literal>Use Procedure Bodies</literal></entry>
+ <entry>true</entry>
+ <entry>Setting this option to <literal>false</literal> indicates that the user
+ connecting to the database does not have the
+ <literal>SELECT</literal> privileges for the
+ <literal>mysql.proc</literal> (stored procedures)
+ table. When to set to <literal>false</literal>,
+ Connector/NET will not rely on this information being
+ available when the procedure is called. Because
+ Connector/NET will be unable to determine this
+ information, you should explicitly set the types of
+ the all the parameters before the call and the
+ parameters should be added to the command in the exact
+ same order as they appear in the procedure definition.
+ This option was added in Connector/NET 5.0.4 and
+ Connector/NET 1.0.10.</entry>
+ </row>
+ <row>
+ <entry><literal>default command timeout</literal></entry>
+ <entry></entry>
+ <entry>Sets the default value of the command timeout to be used. This does not
+ supercede the individual command timeout property on
+ an individual command object. If you set the command
+ timeout property, that will be used. This option was
+ added in Connector/NET 5.1.4</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ The following table lists the valid names for connection
+ pooling values within the <literal>ConnectionString</literal>.
+ For more information about connection pooling, see Connection
+ Pooling for the MySQL Data Provider.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="10*"/>
+ <colspec colwidth="55*"/>
+ <tbody>
+ <row>
+ <entry>Name</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ <row>
+ <entry><literal>Connection Lifetime</literal></entry>
+ <entry>0</entry>
+ <entry>When a connection is returned to the pool, its creation time is compared
+ with the current time, and the connection is destroyed
+ if that time span (in seconds) exceeds the value
+ specified by <literal>Connection Lifetime</literal>.
+ This is useful in clustered configurations to force
+ load balancing between a running server and a server
+ just brought online. A value of zero (0) causes pooled
+ connections to have the maximum connection timeout.</entry>
+ </row>
+ <row>
+ <entry><literal>Max Pool Size</literal></entry>
+ <entry>100</entry>
+ <entry>The maximum number of connections allowed in the pool.</entry>
+ </row>
+ <row>
+ <entry><literal>Min Pool Size</literal></entry>
+ <entry>0</entry>
+ <entry>The minimum number of connections allowed in the pool.</entry>
+ </row>
+ <row>
+ <entry><literal>Pooling</literal></entry>
+ <entry>true</entry>
+ <entry>When <literal>true</literal>, the <literal>MySqlConnection</literal>
+ object is drawn from the appropriate pool, or if
+ necessary, is created and added to the appropriate
+ pool. Recognized values are <literal>true</literal>,
+ <literal>false</literal>, <literal>yes</literal>, and
+ <literal>no</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>Reset Pooled Connections</literal>,
+ <literal>ResetConnections</literal>,
+ <literal>ResetPooledConnections</literal></entry>
+ <entry>true</entry>
+ <entry>Specifies whether a ping and a reset should be sent to the server before
+ a pooled connection is returned. Not resetting will
+ yield faster connection opens but also will not clear
+ out session items such as temp tables.</entry>
+ </row>
+ <row>
+ <entry><literal>Cache Server Configuration</literal>,
+ <literal>CacheServerConfiguration</literal>,
+ <literal>CacheServerConfig</literal></entry>
+ <entry>false</entry>
+ <entry>Specifies whether server variables should be updated when a pooled
+ connection is returned. Turning this one will yeild
+ faster opens but will also not catch any server
+ changes made by other connections.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ When setting keyword or connection pooling values that require
+ a Boolean value, you can use 'yes' instead of 'true', and 'no'
+ instead of 'false'.
+ </para>
+
+ <note>
+ <para>
+ The MySQL Data Provider uses the native socket protocol to
+ communicate with MySQL. Therefore, it does not support the
+ use of an ODBC data source name (DSN) when connecting to
+ MySQL because it does not add an ODBC layer.
+ </para>
+ </note>
+
+ <caution>
+ <para>
+ In this release, the application should use caution when
+ constructing a connection string based on user input (for
+ example when retrieving user ID and password information
+ from a dialog box, and appending it to the connection
+ string). The application should ensure that a user cannot
+ embed extra connection string parameters in these values
+ (for example, entering a password as
+ "validpassword;database=somedb" in an attempt to attach to a
+ different database).
+ </para>
+ </caution>
+
+ <para>
+ <emphasis role="bold">Examples</emphasis>
+ </para>
+
+ <para>
+ The following example creates a
+ <literal>MySqlConnection</literal> and sets some of its
+ properties
+ </para>
+
+ <para>
+ Visual Basic example:
+ </para>
+
+<programlisting> Public Sub CreateConnection()
+ Dim myConnection As New MySqlConnection()
+ myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"
+ myConnection.Open()
+ End Sub 'CreateConnection
+ </programlisting>
+
+ <para>
+ C# example:
+ </para>
+
+<programlisting> public void CreateConnection()
+ {
+ MySqlConnection myConnection = new MySqlConnection();
+ myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass";
+ myConnection.Open();
+ }
+ </programlisting>
+
+ <para>
+ <emphasis role="bold">Examples</emphasis>
+ </para>
+
+ <para>
+ The following example creates a
+ <literal>MySqlConnection</literal> in Unix environment with
+ Mono installed. MySQL socket filename used in this example is
+ "/var/lib/mysql/mysql.sock". The actual filename depends on
+ your MySQL configuration.
+ </para>
+
+ <para>
+ Visual Basic example:
+ </para>
+
+<programlisting> Public Sub CreateConnection()
+ Dim myConnection As New MySqlConnection()
+ myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass"
+ myConnection.Open()
+ End Sub 'CreateConnection
+ </programlisting>
+
+ <para>
+ C# example:
+ </para>
+
+<programlisting> public void CreateConnection()
+ {
+ MySqlConnection myConnection = new MySqlConnection();
+ myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass";
+ myConnection.Open();
+ }
+ </programlisting>
+
+ </section>
+
<section id="connector-net-examples-mysqlconnection-open">
<title>Open</title>
@@ -3683,516 +4219,6 @@
</section>
- <section id="connector-net-examples-mysqlconnection-connectionstring">
-
- <title>ConnectionString</title>
-
- <para>
- Gets or sets the string used to connect to a MySQL Server
- database.
- </para>
-
- <para>
- The <literal>ConnectionString</literal> returned may not be
- exactly like what was originally set but will be indentical in
- terms of keyword/value pairs. Security information will not be
- included unless the Persist Security Info value is set to
- true.
- </para>
-
- <para>
- You can use the <literal>ConnectionString</literal> property
- to connect to a database. The following example illustrates a
- typical connection string.
- </para>
-
-<programlisting>"Persist Security Info=False;database=MyDB;»
- server=MySqlServer;user id=myUser;Password=myPass"</programlisting>
-
- <para>
- The <literal>ConnectionString</literal> property can be set
- only when the connection is closed. Many of the connection
- string values have corresponding read-only properties. When
- the connection string is set, all of these properties are
- updated, except when an error is detected. In this case, none
- of the properties are updated.
- <literal>MySqlConnection</literal> properties return only
- those settings contained in the
- <literal>ConnectionString</literal>.
- </para>
-
- <para>
- To connect to a local machine, specify "localhost" for the
- server. If you do not specify a server, localhost is assumed.
- </para>
-
- <para>
- Resetting the <literal>ConnectionString</literal> on a closed
- connection resets all connection string values (and related
- properties) including the password. For example, if you set a
- connection string that includes "Database= MyDb", and then
- reset the connection string to "Data Source=myserver;User
- Id=myUser;Password=myPass", the
- <literal>MySqlConnection.Database</literal> property is no
- longer set to MyDb.
- </para>
-
- <para>
- The connection string is parsed immediately after being set.
- If errors in syntax are found when parsing, a runtime
- exception, such as <literal>ArgumentException</literal>, is
- generated. Other errors can be found only when an attempt is
- made to open the connection.
- </para>
-
- <para>
- The basic format of a connection string consists of a series
- of keyword/value pairs separated by semicolons. The equal sign
- (<literal>=</literal>) connects each keyword and its value.
- Additional notes on setting values for options:
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- To include values that contain a semicolon, single-quote
- character, or double-quote character, the value must be
- enclosed in double quotes. If the value contains both a
- semicolon and a double-quote character, the value can be
- enclosed in single quotes. The single quote is also useful
- if the value begins with a double-quote character.
- Conversely, the double quote can be used if the value
- begins with a single quote. If the value contains both
- single-quote and double-quote characters, the quote
- character used to enclose the value must be doubled each
- time it occurs within the value.
- </para>
- </listitem>
-
- <listitem>
- <para>
- To include preceding or trailing spaces in the string
- value, the value must be enclosed in either single quotes
- or double quotes. Any leading or trailing spaces around
- integer, Boolean, or enumerated values are ignored, even
- if enclosed in quotes. However, spaces within a string
- literal keyword or value are preserved. Using .NET
- Framework version 1.1, single or double quotes may be used
- within a connection string without using delimiters (for
- example, Data Source= my'Server or Data Source=
- my"Server), unless a quote character is the first or last
- character in the value.
- </para>
- </listitem>
-
- <listitem>
- <para>
- To include an equal sign (=) in a keyword or value, it
- must be preceded by another equal sign. For example, in
- the hypothetical connection string
- </para>
-
-<programlisting>"key==word=value"</programlisting>
-
- <para>
- the keyword is "key=word" and the value is "value".
- </para>
- </listitem>
-
- <listitem>
- <para>
- If a specific keyword in a keyword= value pair occurs
- multiple times in a connection string, the last occurrence
- listed is used in the value set.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Keywords are not case sensitive.
- </para>
- </listitem>
-
- </itemizedlist>
-
- <para>
- The following table lists the valid names for keyword values
- within the <literal>ConnectionString</literal>.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="35*"/>
- <colspec colwidth="10*"/>
- <colspec colwidth="55*"/>
- <tbody>
- <row>
- <entry>Name</entry>
- <entry>Default</entry>
- <entry>Description</entry>
- </row>
- <row>
- <entry><literal>Connect Timeout</literal>, <literal>Connection
- Timeout</literal></entry>
- <entry>15</entry>
- <entry>The length of time (in seconds) to wait for a connection to the server
- before terminating the attempt and generating an
- error.</entry>
- </row>
- <row>
- <entry><literal>Host</literal>, <literal>Server</literal>, <literal>Data
- Source</literal>, <literal>DataSource</literal>,
- <literal>Address</literal>, <literal>Addr</literal>,
- <literal>Network Address</literal></entry>
- <entry>localhost</entry>
- <entry>The name or network address of the instance of MySQL to which to
- connect. Multiple hosts can be specified separated by
- &. This can be useful where multiple MySQL servers
- are configured for replication and you are not
- concerned about the precise server you are connecting
- to. No attempt is made by the provider to synchronize
- writes to the database so care should be taken when
- using this option. In Unix environment with Mono, this
- can be a fully qualified path to MySQL socket
- filename. With this configuration, the Unix socket
- will be used instead of TCP/IP socket. Currently only
- a single socket name can be given so accessing MySQL
- in a replicated environment using Unix sockets is not
- currently supported.</entry>
- </row>
- <row>
- <entry><literal>Ignore Prepare</literal></entry>
- <entry>true</entry>
- <entry>When true, instructs the provider to ignore any calls to
- <literal>MySqlCommand.Prepare()</literal>. This option
- is provided to prevent issues with corruption of the
- statements when use with server side prepared
- statements. If you want to use server-side prepare
- statements, set this option to false. This option was
- added in Connector/NET 5.0.3 and Connector/NET 1.0.9.</entry>
- </row>
- <row>
- <entry><literal>Port</literal></entry>
- <entry>3306</entry>
- <entry>The port MySQL is using to listen for connections. Specify -1 for this
- value to use a named pipe connection (Windows only).
- This value is ignored if Unix socket is used.</entry>
- </row>
- <row>
- <entry><literal>Protocol</literal></entry>
- <entry>socket</entry>
- <entry>Specifies the type of connection to make to the server.Values can be:
- socket or tcp for a socket connection pipe for a named
- pipe connection unix for a Unix socket connection
- memory to use MySQL shared memory</entry>
- </row>
- <row>
- <entry><literal>CharSet</literal>, <literal>Character Set</literal></entry>
- <entry/>
- <entry>Specifies the character set that should be used to encode all queries
- sent to the server. Resultsets are still returned in
- the character set of the data returned.</entry>
- </row>
- <row>
- <entry><literal>Logging</literal></entry>
- <entry>false</entry>
- <entry>When true, various pieces of information is output to any configured
- TraceListeners.</entry>
- </row>
- <row>
- <entry><literal>Allow Batch</literal></entry>
- <entry>true</entry>
- <entry>When true, multiple SQL statements can be sent with one command
- execution. -Note- Starting with MySQL 4.1.1, batch
- statements should be separated by the server-defined
- seperator character. Commands sent to earlier versions
- of MySQL should be seperated with ';'.</entry>
- </row>
- <row>
- <entry><literal>Encrypt</literal></entry>
- <entry>false</entry>
- <entry>For Connector/NET 5.0.3 and later, when <literal>true</literal>, SSL
- encryption is used for all data sent between the
- client and server if the server has a certificate
- installed. Recognized values are
- <literal>true</literal>, <literal>false</literal>,
- <literal>yes</literal>, and <literal>no</literal>. In
- versions before 5.0.3, this option had no effect.</entry>
- </row>
- <row>
- <entry><literal>Initial Catalog</literal>, <literal>Database</literal></entry>
- <entry>mysql</entry>
- <entry>The name of the database to use intially</entry>
- </row>
- <row>
- <entry><literal>Password</literal>, <literal>pwd</literal></entry>
- <entry/>
- <entry>The password for the MySQL account being used.</entry>
- </row>
- <row>
- <entry><literal>Persist Security Info</literal></entry>
- <entry>false</entry>
- <entry>When set to <literal>false</literal> or <literal>no</literal> (strongly
- recommended), security-sensitive information, such as
- the password, is not returned as part of the
- connection if the connection is open or has ever been
- in an open state. Resetting the connection string
- resets all connection string values including the
- password. Recognized values are
- <literal>true</literal>, <literal>false</literal>,
- <literal>yes</literal>, and <literal>no</literal>.</entry>
- </row>
- <row>
- <entry><literal>User Id</literal>, <literal>Username</literal>,
- <literal>Uid</literal>, <literal>User name</literal></entry>
- <entry/>
- <entry>The MySQL login account being used.</entry>
- </row>
- <row>
- <entry><literal>Shared Memory Name</literal></entry>
- <entry>MYSQL</entry>
- <entry>The name of the shared memory object to use for communication if the
- connection protocol is set to memory.</entry>
- </row>
- <row>
- <entry><literal>Allow Zero Datetime</literal></entry>
- <entry>false</entry>
- <entry>True to have MySqlDataReader.GetValue() return a MySqlDateTime for date
- or datetime columns that have illegal values. False
- will cause a <literal>System.DateTime</literal> object
- to be returned for legal values and an exception will
- be thrown for illegal values.</entry>
- </row>
- <row>
- <entry><literal>Convert Zero Datetime</literal></entry>
- <entry>false</entry>
- <entry>True to have <literal>MySqlDataReader.GetValue()</literal> and
- <literal>MySqlDataReader.GetDateTime()</literal>
- return DateTime.MinValue for date or datetime columns
- that have illegal values.</entry>
- </row>
- <row>
- <entry><literal>Old Syntax</literal>, <literal>OldSyntax</literal></entry>
- <entry>false</entry>
- <entry>Allows use of '@' symbol as a parameter marker. See
- <literal>MySqlCommand</literal> for more info. This is
- for compatibility only. All future code should be
- written to use the new '?' parameter marker.</entry>
- </row>
- <row>
- <entry><literal>Pipe Name</literal>, <literal>Pipe</literal></entry>
- <entry>mysql</entry>
- <entry>When set to the name of a named pipe, the
- <literal>MySqlConnection</literal> will attempt to
- connect to MySQL on that named pipe.This settings only
- applies to the Windows platform.</entry>
- </row>
- <row>
- <entry><literal>Procedure Cache</literal></entry>
- <entry>25</entry>
- <entry>Sets the size of the stored procedure cache. By default, Connector/NET
- will store the metadata (input/output datatypes) about
- the last 25 stored procedures used. To disable the
- stored procedure cache, set the value to zero (0).
- This option was added in Connector/NET 5.0.2 and
- Connector/NET 1.0.9.</entry>
- </row>
- <row>
- <entry><literal>Use Procedure Bodies</literal></entry>
- <entry>true</entry>
- <entry>Setting this option to <literal>false</literal> indicates that the user
- connecting to the database does not have the
- <literal>SELECT</literal> privileges for the
- <literal>mysql.proc</literal> (stored procedures)
- table. When to set to <literal>false</literal>,
- Connector/NET will not rely on this information being
- available when the procedure is called. Because
- Connector/NET will be unable to determine this
- information, you should explicitly set the types of
- the all the parameters before the call and the
- parameters should be added to the command in the exact
- same order as they appear in the procedure definition.
- This option was added in Connector/NET 5.0.4 and
- Connector/NET 1.0.10.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- The following table lists the valid names for connection
- pooling values within the <literal>ConnectionString</literal>.
- For more information about connection pooling, see Connection
- Pooling for the MySQL Data Provider.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="35*"/>
- <colspec colwidth="10*"/>
- <colspec colwidth="55*"/>
- <tbody>
- <row>
- <entry>Name</entry>
- <entry>Default</entry>
- <entry>Description</entry>
- </row>
- <row>
- <entry><literal>Connection Lifetime</literal></entry>
- <entry>0</entry>
- <entry>When a connection is returned to the pool, its creation time is compared
- with the current time, and the connection is destroyed
- if that time span (in seconds) exceeds the value
- specified by <literal>Connection Lifetime</literal>.
- This is useful in clustered configurations to force
- load balancing between a running server and a server
- just brought online. A value of zero (0) causes pooled
- connections to have the maximum connection timeout.</entry>
- </row>
- <row>
- <entry><literal>Max Pool Size</literal></entry>
- <entry>100</entry>
- <entry>The maximum number of connections allowed in the pool.</entry>
- </row>
- <row>
- <entry><literal>Min Pool Size</literal></entry>
- <entry>0</entry>
- <entry>The minimum number of connections allowed in the pool.</entry>
- </row>
- <row>
- <entry><literal>Pooling</literal></entry>
- <entry>true</entry>
- <entry>When <literal>true</literal>, the <literal>MySqlConnection</literal>
- object is drawn from the appropriate pool, or if
- necessary, is created and added to the appropriate
- pool. Recognized values are <literal>true</literal>,
- <literal>false</literal>, <literal>yes</literal>, and
- <literal>no</literal>.</entry>
- </row>
- <row>
- <entry><literal>Reset Pooled Connections</literal>,
- <literal>ResetConnections</literal>,
- <literal>ResetPooledConnections</literal></entry>
- <entry>true</entry>
- <entry>Specifies whether a ping and a reset should be sent to the server before
- a pooled connection is returned. Not resetting will
- yield faster connection opens but also will not clear
- out session items such as temp tables.</entry>
- </row>
- <row>
- <entry><literal>Cache Server Configuration</literal>,
- <literal>CacheServerConfiguration</literal>,
- <literal>CacheServerConfig</literal></entry>
- <entry>false</entry>
- <entry>Specifies whether server variables should be updated when a pooled
- connection is returned. Turning this one will yeild
- faster opens but will also not catch any server
- changes made by other connections.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- When setting keyword or connection pooling values that require
- a Boolean value, you can use 'yes' instead of 'true', and 'no'
- instead of 'false'.
- </para>
-
- <note>
- <para>
- The MySQL Data Provider uses the native socket protocol to
- communicate with MySQL. Therefore, it does not support the
- use of an ODBC data source name (DSN) when connecting to
- MySQL because it does not add an ODBC layer.
- </para>
- </note>
-
- <caution>
- <para>
- In this release, the application should use caution when
- constructing a connection string based on user input (for
- example when retrieving user ID and password information
- from a dialog box, and appending it to the connection
- string). The application should ensure that a user cannot
- embed extra connection string parameters in these values
- (for example, entering a password as
- "validpassword;database=somedb" in an attempt to attach to a
- different database).
- </para>
- </caution>
-
- <para>
- <emphasis role="bold">Examples</emphasis>
- </para>
-
- <para>
- The following example creates a
- <literal>MySqlConnection</literal> and sets some of its
- properties
- </para>
-
- <para>
- Visual Basic example:
- </para>
-
-<programlisting> Public Sub CreateConnection()
- Dim myConnection As New MySqlConnection()
- myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"
- myConnection.Open()
- End Sub 'CreateConnection
- </programlisting>
-
- <para>
- C# example:
- </para>
-
-<programlisting> public void CreateConnection()
- {
- MySqlConnection myConnection = new MySqlConnection();
- myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass";
- myConnection.Open();
- }
- </programlisting>
-
- <para>
- <emphasis role="bold">Examples</emphasis>
- </para>
-
- <para>
- The following example creates a
- <literal>MySqlConnection</literal> in Unix environment with
- Mono installed. MySQL socket filename used in this example is
- "/var/lib/mysql/mysql.sock". The actual filename depends on
- your MySQL configuration.
- </para>
-
- <para>
- Visual Basic example:
- </para>
-
-<programlisting> Public Sub CreateConnection()
- Dim myConnection As New MySqlConnection()
- myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass"
- myConnection.Open()
- End Sub 'CreateConnection
- </programlisting>
-
- <para>
- C# example:
- </para>
-
-<programlisting> public void CreateConnection()
- {
- MySqlConnection myConnection = new MySqlConnection();
- myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass";
- myConnection.Open();
- }
- </programlisting>
-
- </section>
-
</section>
<section id="connector-net-examples-mysqldataadapter">
@@ -21402,8 +21428,8 @@
<listitem>
<para>
- <literal>tablename</literal>: Tablename in the data set
- to update
+ <literal>tablename</literal>: Tablename in the data
+ set to update
</para>
</listitem>
@@ -24341,13 +24367,13 @@
</para>
<para>
- The second option is to create a data set in VB.NET and save it
- as XML. This XML file can then be used to design a report.
+ The second option is to create a data set in VB.NET and save
+ it as XML. This XML file can then be used to design a report.
This works quite well when displaying the report in your
application, but is less versatile at design time because you
- must choose all relevant columns when creating the data set. If
- you forget a column you must re-create the data set before the
- column can be added to the report.
+ must choose all relevant columns when creating the data set.
+ If you forget a column you must re-create the data set before
+ the column can be added to the report.
</para>
<para>
@@ -24623,9 +24649,10 @@
<para>
When a report is created from multiple tables using
- Connector/ODBC, a data set with multiple tables must be created
- in our application. This allows each table in the report data
- source to be replaced with a report in the data set.
+ Connector/ODBC, a data set with multiple tables must be
+ created in our application. This allows each table in the
+ report data source to be replaced with a report in the data
+ set.
</para>
<para>
@@ -24948,6 +24975,82 @@
</section>
+ <section id="connector-net-using-faq">
+
+ <title>Frequently Asked Questions</title>
+
+ <para>
+ The following details a number of frequently asked questions
+ about Connector/NET.
+ </para>
+
+ <qandaset>
+
+ <qandaentry>
+
+ <question>
+
+ <para>
+ How do I obtain the value of an auto-incremented column?
+ </para>
+
+ </question>
+
+ <answer>
+
+ <para>
+ When using the <classname>commandBuilder</classname> you
+ should make sure that you set the
+ <literal>ReturnGeneratedIdentifiers</literal> property to
+ <literal>true</literal>.
+ </para>
+
+ <para>
+ Then, you can use an active view on a table to access the
+ updated ID. For example:
+ </para>
+
+<programlisting>
+ conn = new MySql.Data.MySqlClient.MySqlConnection();
+ cmd = new MySql.Data.MySqlClient.MySqlCommand();
+ da = new MySql.Data.MySqlClient.MySqlDataAdapter();
+ cmdBuilder = new MySql.Data.MySqlClient.MySqlCommandBuilder();
+ SystemDataDataSet = new System.Data.DataSet();
+ SystemDataDataView = new System.Data.DataView();
+...
+ cmd.Connection = conn;
+ cmd.CommandText = "SELECT * FROM contacts";
+ da.SelectCommand = cmd;
+ da.Fill(SystemDataDataSet, "contacts");
+ cmdBuilder.DataAdapter = da;
+ cmdBuilder.ReturnGeneratedIdentifiers = true;
+ cmdBuilder.DataAdapter.SelectCommand.CommandText = "SELECT * FROM contacts";
+ cmdBuilder.RefreshSchema();
+
+ SystemDataDataView = SystemDataDataSet.Tables["contacts"].DefaultView;
+
+ SystemDataDataRow = SystemDataDataView.Table.NewRow();
+ SystemDataDataRow["status"] = 1;
+
+ SystemDataDataView.Table.Rows.Add(SystemDataDataRow);
+ da.Update(SystemDataDataSet, "contacts");
+ System.Console.WriteLine("ID after update: " + SystemDataDataRow["id"]);
+ </programlisting>
+
+ <para>
+ The <literal>SystemDataDataRow</literal> object in this
+ instance provides the interface to the updated
+ auto-increment value in the <literal>id</literal> column.
+ </para>
+
+ </answer>
+
+ </qandaentry>
+
+ </qandaset>
+
+ </section>
+
</section>
<section id="connect-net-support">
Modified: trunk/refman-common/connector-odbc.xml
===================================================================
--- trunk/refman-common/connector-odbc.xml 2007-11-13 03:15:50 UTC (rev 8669)
+++ trunk/refman-common/connector-odbc.xml 2007-11-13 11:22:22 UTC (rev 8670)
Changed blocks: 3, Lines Added: 449, Lines Deleted: 431; 39053 bytes
@@ -91,6 +91,14 @@
<listitem>
<para>
+ For information on the configuration options, see
+ <xref
+ linkend="myodbc-configuration-connection-parameters"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
For more information on connecting to a MySQL database from a
Windows host using Connector/ODBC see
<xref
@@ -2683,6 +2691,447 @@
</section>
+ <section id="myodbc-configuration-connection-parameters">
+
+ <title>Connector/ODBC Connection Parameters</title>
+
+ <para>
+ You can specify the parameters in the following tables for
+ Connector/ODBC when configuring a DSN. Users on Windows can use
+ the Options and Advanced panels when configuring a DSN to set
+ these parameters; see the table for information on which options
+ relate to which fields and checkboxes. On Unix and Mac OS X, use
+ the parameter name and value as the keyword/value pair in the
+ DSN configuration. Alternatively, you can set these parameters
+ within the <literal>InConnectionString</literal> argument in the
+ <literal>SQLDriverConnect()</literal> call.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="15*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Parameter</entry>
+ <entry>Default Value</entry>
+ <entry>Comment</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>user</literal></entry>
+ <entry>ODBC</entry>
+ <entry>The username used to connect to MySQL.</entry>
+ </row>
+ <row>
+ <entry><literal>uid</literal></entry>
+ <entry>ODBC</entry>
+ <entry>Synonymous with <literal>user</literal>. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>server</literal></entry>
+ <entry><literal>localhost</literal></entry>
+ <entry>The hostname of the MySQL server.</entry>
+ </row>
+ <row>
+ <entry><literal>database</literal></entry>
+ <entry/>
+ <entry>The default database.</entry>
+ </row>
+ <row>
+ <entry><literal>option</literal></entry>
+ <entry>0</entry>
+ <entry>Options that specify how Connector/ODBC should work. See below.</entry>
+ </row>
+ <row>
+ <entry><literal>port</literal></entry>
+ <entry>3306</entry>
+ <entry>The TCP/IP port to use if <literal>server</literal> is not
+ <literal>localhost</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>stmt</literal></entry>
+ <entry/>
+ <entry>A statement to execute when connecting to MySQL.</entry>
+ </row>
+ <row>
+ <entry><literal>password</literal></entry>
+ <entry/>
+ <entry>The password for the <literal>user</literal> account on
+ <literal>server</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>pwd</literal></entry>
+ <entry/>
+ <entry>Synonymous with <literal>password</literal>. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>socket</literal></entry>
+ <entry/>
+ <entry>The Unix socket file or Windows named pipe to connect to if
+ <literal>server</literal> is
+ <literal>localhost</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>sslca</literal></entry>
+ <entry/>
+ <entry>The path to a file with a list of trust SSL CAs. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcapath</literal></entry>
+ <entry/>
+ <entry>The path to a directory that contains trusted SSL CA certificates in PEM
+ format. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcert</literal></entry>
+ <entry/>
+ <entry>The name of the SSL certificate file to use for establishing a secure
+ connection. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcipher</literal></entry>
+ <entry/>
+ <entry>A list of allowable ciphers to use for SSL encryption. The cipher list
+ has the same format as the <literal>openssl
+ ciphers</literal> command Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslkey</literal></entry>
+ <entry/>
+ <entry>The name of the SSL key file to use for establishing a secure
+ connection. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>charset</literal></entry>
+ <entry/>
+ <entry>The character set to use for the connection. Added in 3.51.17.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <note>
+ <para>
+ The SSL configuration parameters can also be automatically
+ loaded from a <filename>my.ini</filename> or
+ <filename>my.cnf</filename> file.
+ </para>
+ </note>
+
+ <para>
+ The <literal>option</literal> argument is used to tell
+ Connector/ODBC that the client isn't 100% ODBC compliant. On
+ Windows, you normally select options by toggling the checkboxes
+ in the connection screen, but you can also select them in the
+ <literal>option</literal> argument. The following options are
+ listed in the order in which they appear in the Connector/ODBC
+ connect screen:
+ </para>
+
+ <informaltable>
+ <tgroup cols="4">
+ <colspec colwidth="10*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="50*"/>
+ <tbody>
+ <row>
+ <entry><emphasis role="bold">Value</emphasis></entry>
+ <entry><emphasis role="bold">Flagname</emphasis></entry>
+ <entry><emphasis role="bold">GUI Option</emphasis></entry>
+ <entry><emphasis role="bold">Description</emphasis></entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry><literal>FLAG_FIELD_LENGTH</literal></entry>
+ <entry>Don't Optimize Column Width</entry>
+ <entry>The client can't handle that Connector/ODBC returns the real width of a
+ column. This option was removed in 3.51.18.</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry><literal>FLAG_FOUND_ROWS</literal></entry>
+ <entry>Return Matching Rows</entry>
+ <entry>The client can't handle that MySQL returns the true value of affected
+ rows. If this flag is set, MySQL returns <quote>found
+ rows</quote> instead. You must have MySQL 3.21.14 or
+ newer to get this to work.</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry><literal>FLAG_DEBUG</literal></entry>
+ <entry>Trace Driver Calls To myodbc.log</entry>
+ <entry>Make a debug log in <filename>C:\myodbc.log</filename> on Windows, or
+ <filename>/tmp/myodbc.log</filename> on Unix variants.</entry>
+ </row>
+ <row>
+ <entry>8</entry>
+ <entry><literal>FLAG_BIG_PACKETS</literal></entry>
+ <entry>Allow Big Results</entry>
+ <entry>Don't set any packet limit for results and parameters.</entry>
+ </row>
+ <row>
+ <entry>16</entry>
+ <entry><literal>FLAG_NO_PROMPT</literal></entry>
+ <entry>Don't Prompt Upon Connect</entry>
+ <entry>Don't prompt for questions even if driver would like to prompt.</entry>
+ </row>
+ <row>
+ <entry>32</entry>
+ <entry><literal>FLAG_DYNAMIC_CURSOR</literal></entry>
+ <entry>Enable Dynamic Cursor</entry>
+ <entry>Enable or disable the dynamic cursor support. (Not allowed in
+ Connector/ODBC 2.50.)</entry>
+ </row>
+ <row>
+ <entry>64</entry>
+ <entry><literal>FLAG_NO_SCHEMA</literal></entry>
+ <entry>Ignore # in Table Name</entry>
+ <entry>Ignore use of database name in
+ <literal>db_name.tbl_name.col_name</literal>.</entry>
+ </row>
+ <row>
+ <entry>128</entry>
+ <entry><literal>FLAG_NO_DEFAULT_CURSOR</literal></entry>
+ <entry>User Manager Cursors</entry>
+ <entry>Force use of ODBC manager cursors (experimental).</entry>
+ </row>
+ <row>
+ <entry>256</entry>
+ <entry><literal>FLAG_NO_LOCALE</literal></entry>
+ <entry>Don't Use Set Locale</entry>
+ <entry>Disable the use of extended fetch (experimental).</entry>
+ </row>
+ <row>
+ <entry>512</entry>
+ <entry><literal>FLAG_PAD_SPACE</literal></entry>
+ <entry>Pad Char To Full Length</entry>
+ <entry>Pad <literal>CHAR</literal> columns to full column length.</entry>
+ </row>
+ <row>
+ <entry>1024</entry>
+ <entry><literal>FLAG_FULL_COLUMN_NAMES</literal></entry>
+ <entry>Return Table Names for SQLDescribeCol</entry>
+ <entry><literal>SQLDescribeCol()</literal> returns fully qualified column
+ names.</entry>
+ </row>
+ <row>
+ <entry>2048</entry>
+ <entry><literal>FLAG_COMPRESSED_PROTO</literal></entry>
+ <entry>Use Compressed Protocol</entry>
+ <entry>Use the compressed client/server protocol.</entry>
+ </row>
+ <row>
+ <entry>4096</entry>
+ <entry><literal>FLAG_IGNORE_SPACE</literal></entry>
+ <entry>Ignore Space After Function Names</entry>
+ <entry>Tell server to ignore space after function name and before
+ <quote><literal>(</literal></quote> (needed by
+ PowerBuilder). This makes all function names keywords.</entry>
+ </row>
+ <row>
+ <entry>8192</entry>
+ <entry><literal>FLAG_NAMED_PIPE</literal></entry>
+ <entry>Force Use of Named Pipes</entry>
+ <entry>Connect with named pipes to a <command>mysqld</command> server running
+ on NT.</entry>
+ </row>
+ <row>
+ <entry>16384</entry>
+ <entry><literal>FLAG_NO_BIGINT</literal></entry>
+ <entry>Change BIGINT Columns to Int</entry>
+ <entry>Change <literal>BIGINT</literal> columns to <literal>INT</literal>
+ columns (some applications can't handle
+ <literal>BIGINT</literal>).</entry>
+ </row>
+ <row>
+ <entry>32768</entry>
+ <entry><literal>FLAG_NO_CATALOG</literal></entry>
+ <entry>No Catalog</entry>
+ <entry>Forces results from the catalog functions, such as
+ <literal>SQLTables</literal>, to always return
+ <literal>NULL</literal> and the driver to report that
+ catalogs are not supported.</entry>
+ </row>
+ <row>
+ <entry>65536</entry>
+ <entry><literal>FLAG_USE_MYCNF</literal></entry>
+ <entry>Read Options From <literal>my.cnf</literal></entry>
+ <entry>Read parameters from the <literal>[client]</literal> and
+ <literal>[odbc]</literal> groups from
+ <filename>my.cnf</filename>.</entry>
+ </row>
+ <row>
+ <entry>131072</entry>
+ <entry><literal>FLAG_SAFE</literal></entry>
+ <entry>Safe</entry>
+ <entry>Add some extra safety checks.</entry>
+ </row>
+ <row>
+ <entry>262144</entry>
+ <entry><literal>FLAG_NO_TRANSACTIONS</literal></entry>
+ <entry>Disable transactions</entry>
+ <entry>Disable transactions.</entry>
+ </row>
+ <row>
+ <entry>524288</entry>
+ <entry><literal>FLAG_LOG_QUERY</literal></entry>
+ <entry>Save queries to <filename>myodbc.sql</filename></entry>
+ <entry>Enable query logging to
+ <filename>c:\myodbc.sql</filename>(<filename>/tmp/myodbc.sql</filename>)
+ file. (Enabled only in debug mode.)</entry>
+ </row>
+ <row>
+ <entry>1048576</entry>
+ <entry><literal>FLAG_NO_CACHE</literal></entry>
+ <entry>Don't Cache Result (forward only cursors)</entry>
+ <entry>Do not cache the results locally in the driver, instead read from server
+ (<function role="capi">mysql_use_result()</function>).
+ This works only for forward-only cursors. This option is
+ very important in dealing with large tables when you
+ don't want the driver to cache the entire result set.</entry>
+ </row>
+ <row>
+ <entry>2097152</entry>
+ <entry><literal>FLAG_FORWARD_CURSOR</literal></entry>
+ <entry>Force Use Of Forward Only Cursors</entry>
+ <entry>Force the use of <literal>Forward-only</literal> cursor type. In case of
+ applications setting the default static/dynamic cursor
+ type, and one wants the driver to use non-cache result
+ sets, then this option ensures the forward-only cursor
+ behavior.</entry>
+ </row>
+ <row>
+ <entry>4194304</entry>
+ <entry><literal>FLAG_AUTO_RECONNECT</literal></entry>
+ <entry>Enable auto-reconnect.</entry>
+ <entry>Enables auto-reconnection functionality. You should not use this option
+ with transactions, since a auto reconnection during a
+ incomplete transaction may cause corruption. Note that
+ an auto-reconnected connection will not inherit the same
+ settings and environment as the original. This option
+ was enabled in Connector/ODBC 3.51.13.</entry>
+ </row>
+ <row>
+ <entry>8388608</entry>
+ <entry><literal>FLAG_AUTO_IS_NULL</literal></entry>
+ <entry>Flag Auto Is Null</entry>
+ <entry>When set, this option causes the connection to set the
+ <literal>SQL_AUTO_IS_NULL</literal> option to 1. This
+ disables the standard behavior, but may enable older
+ applications to correctly identify
+ <literal>AUTO_INCREMENT</literal> values. For more
+ information. See
+ <link linkend="operator_is-null"><literal>IS
+ NULL</literal></link> This option was enabled in
+ Connector/ODBC 3.51.13.</entry>
+ </row>
+ <row>
+ <entry>16777216</entry>
+ <entry><literal>FLAG_ZERO_DATE_TO_MIN</literal></entry>
+ <entry>Flag Zero Date to Min</entry>
+ <entry>Translates zero dates (<literal>XXXX-00-00</literal>) into the minimum
+ date values supported by ODBC,
+ <literal>XXXX-01-01</literal>. This resolves an issue
+ where some statement swill not work because the date
+ returned and the minimumd ODBC date value are
+ incompatible.This option was enabled in Connector/ODBC
+ 3.51.17.</entry>
+ </row>
+ <row>
+ <entry>33554432</entry>
+ <entry><literal>FLAG_MIN_DATE_TO_ZERO</literal></entry>
+ <entry>Flag Min Date to Zero</entry>
+ <entry>Translates the minimum ODBC date value (<literal>XXXX-01-01</literal>)
+ to the zero date format supported by MySQL
+ (<literal>XXXX-00-00</literal>). This resolves an issue
+ where some statement swill not work because the date
+ returned and the minimumd ODBC date value are
+ incompatible. This option was enabled in Connector/ODBC
+ 3.51.17.</entry>
+ </row>
+ <row>
+ <entry>67108864</entry>
+ <entry><literal>FLAG_MULTI_STATEMENTS</literal></entry>
+ <entry>Allow multiple statements</entry>
+ <entry>Enables support for batched statements. This option was enabled in
+ Connector/ODBC 3.51.18.</entry>
+ </row>
+ <row>
+ <entry>134217728</entry>
+ <entry><literal>FLAG_COLUMN_SIZE_S32</literal></entry>
+ <entry>Limit column size to 32-bit value</entry>
+ <entry>Limits the column size to a signed 32-bit value to prevent problems with
+ larger column sizes in applications that do not support
+ them. This option is automatically enabled when working
+ with ADO applications. This option was enabled in
+ Connector/ODBC 3.51.22.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ To select multiple options, add together their values. For
+ example, setting <literal>option</literal> to 12 (4+8) gives you
+ debugging without packet limits.
+ </para>
+
+ <para>
+ The following table shows some recommended
+ <literal>option</literal> values for various configurations:
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="85*"/>
+ <colspec colwidth="15*"/>
+ <tbody>
+ <row>
+ <entry><emphasis role="bold">Configuration</emphasis></entry>
+ <entry><emphasis role="bold">Option Value</emphasis></entry>
+ </row>
+ <row>
+ <entry>Microsoft Access, Visual Basic</entry>
+ <entry>3</entry>
+ </row>
+ <row>
+ <entry>Driver trace generation (Debug mode)</entry>
+ <entry>4</entry>
+ </row>
+ <row>
+ <entry>Microsoft Access (with improved DELETE queries)</entry>
+ <entry>35</entry>
+ </row>
+ <row>
+ <entry>Large tables with too many rows</entry>
+ <entry>2049</entry>
+ </row>
+ <row>
+ <entry>Sybase PowerBuilder</entry>
+ <entry>135168</entry>
+ </row>
+ <row>
+ <entry>Query log generation (Debug mode)</entry>
+ <entry>524288</entry>
+ </row>
+ <row>
+ <entry>Generate driver trace as well as query log (Debug mode)</entry>
+ <entry>524292</entry>
+ </row>
+ <row>
+ <entry>Large tables with no-cache results</entry>
+ <entry>3145731</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ </section>
+
<section id="myodbc-configuration-dsn-windows">
<title>Configuring a Connector/ODBC DSN on Windows</title>
@@ -3421,437 +3870,6 @@
</section>
- <section id="myodbc-configuration-connection-parameters">
-
- <title>Connector/ODBC Connection Parameters</title>
-
- <para>
- You can specify the parameters in the following tables for
- Connector/ODBC when configuring a DSN. Users on Windows can use
- the Options and Advanced panels when configuring a DSN to set
- these parameters; see the table for information on which options
- relate to which fields and checkboxes. On Unix and Mac OS X, use
- the parameter name and value as the keyword/value pair in the
- DSN configuration. Alternatively, you can set these parameters
- within the <literal>InConnectionString</literal> argument in the
- <literal>SQLDriverConnect()</literal> call.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="15*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="65*"/>
- <thead>
- <row>
- <entry>Parameter</entry>
- <entry>Default Value</entry>
- <entry>Comment</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>user</literal></entry>
- <entry>ODBC (on Windows)</entry>
- <entry>The username used to connect to MySQL.</entry>
- </row>
- <row>
- <entry><literal>uid</literal></entry>
- <entry>ODBC (on Windows)</entry>
- <entry>Synonymous with <literal>user</literal>. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>server</literal></entry>
- <entry><literal>localhost</literal></entry>
- <entry>The hostname of the MySQL server.</entry>
- </row>
- <row>
- <entry><literal>database</literal></entry>
- <entry/>
- <entry>The default database.</entry>
- </row>
- <row>
- <entry><literal>option</literal></entry>
- <entry>0</entry>
- <entry>Options that specify how Connector/ODBC should work. See below.</entry>
- </row>
- <row>
- <entry><literal>port</literal></entry>
- <entry>3306</entry>
- <entry>The TCP/IP port to use if <literal>server</literal> is not
- <literal>localhost</literal>.</entry>
- </row>
- <row>
- <entry><literal>stmt</literal></entry>
- <entry/>
- <entry>A statement to execute when connecting to MySQL.</entry>
- </row>
- <row>
- <entry><literal>password</literal></entry>
- <entry/>
- <entry>The password for the <literal>user</literal> account on
- <literal>server</literal>.</entry>
- </row>
- <row>
- <entry><literal>pwd</literal></entry>
- <entry/>
- <entry>Synonymous with <literal>password</literal>. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>socket</literal></entry>
- <entry/>
- <entry>The Unix socket file or Windows named pipe to connect to if
- <literal>server</literal> is
- <literal>localhost</literal>.</entry>
- </row>
- <row>
- <entry><literal>sslca</literal></entry>
- <entry/>
- <entry>The path to a file with a list of trust SSL CAs. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcapath</literal></entry>
- <entry/>
- <entry>The path to a directory that contains trusted SSL CA certificates in PEM
- format. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcert</literal></entry>
- <entry/>
- <entry>The name of the SSL certificate file to use for establishing a secure
- connection. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcipher</literal></entry>
- <entry/>
- <entry>A list of allowable ciphers to use for SSL encryption. The cipher list
- has the same format as the <literal>openssl
- ciphers</literal> command Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslkey</literal></entry>
- <entry/>
- <entry>The name of the SSL key file to use for establishing a secure
- connection. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>charset</literal></entry>
- <entry/>
- <entry>The character set to use for the connection. Added in 3.51.17.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <note>
- <para>
- The SSL configuration parameters can also be automatically
- loaded from a <filename>my.ini</filename> or
- <filename>my.cnf</filename> file.
- </para>
- </note>
-
- <para>
- The <literal>option</literal> argument is used to tell
- Connector/ODBC that the client isn't 100% ODBC compliant. On
- Windows, you normally select options by toggling the checkboxes
- in the connection screen, but you can also select them in the
- <literal>option</literal> argument. The following options are
- listed in the order in which they appear in the Connector/ODBC
- connect screen:
- </para>
-
- <informaltable>
- <tgroup cols="4">
- <colspec colwidth="10*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="50*"/>
- <tbody>
- <row>
- <entry><emphasis role="bold">Value</emphasis></entry>
- <entry><emphasis role="bold">Flagname</emphasis></entry>
- <entry><emphasis role="bold">GUI Option</emphasis></entry>
- <entry><emphasis role="bold">Description</emphasis></entry>
- </row>
- <row>
- <entry>1</entry>
- <entry><literal>FLAG_FIELD_LENGTH</literal></entry>
- <entry>Don't Optimize Column Width</entry>
- <entry>The client can't handle that Connector/ODBC returns the real width of a
- column. This option was removed in 3.51.18.</entry>
- </row>
- <row>
- <entry>2</entry>
- <entry><literal>FLAG_FOUND_ROWS</literal></entry>
- <entry>Return Matching Rows</entry>
- <entry>The client can't handle that MySQL returns the true value of affected
- rows. If this flag is set, MySQL returns <quote>found
- rows</quote> instead. You must have MySQL 3.21.14 or
- newer to get this to work.</entry>
- </row>
- <row>
- <entry>4</entry>
- <entry><literal>FLAG_DEBUG</literal></entry>
- <entry>Trace Driver Calls To myodbc.log</entry>
- <entry>Make a debug log in <filename>C:\myodbc.log</filename> on Windows, or
- <filename>/tmp/myodbc.log</filename> on Unix variants.</entry>
- </row>
- <row>
- <entry>8</entry>
- <entry><literal>FLAG_BIG_PACKETS</literal></entry>
- <entry>Allow Big Results</entry>
- <entry>Don't set any packet limit for results and parameters.</entry>
- </row>
- <row>
- <entry>16</entry>
- <entry><literal>FLAG_NO_PROMPT</literal></entry>
- <entry>Don't Prompt Upon Connect</entry>
- <entry>Don't prompt for questions even if driver would like to prompt.</entry>
- </row>
- <row>
- <entry>32</entry>
- <entry><literal>FLAG_DYNAMIC_CURSOR</literal></entry>
- <entry>Enable Dynamic Cursor</entry>
- <entry>Enable or disable the dynamic cursor support. (Not allowed in
- Connector/ODBC 2.50.)</entry>
- </row>
- <row>
- <entry>64</entry>
- <entry><literal>FLAG_NO_SCHEMA</literal></entry>
- <entry>Ignore # in Table Name</entry>
- <entry>Ignore use of database name in
- <literal>db_name.tbl_name.col_name</literal>.</entry>
- </row>
- <row>
- <entry>128</entry>
- <entry><literal>FLAG_NO_DEFAULT_CURSOR</literal></entry>
- <entry>User Manager Cursors</entry>
- <entry>Force use of ODBC manager cursors (experimental).</entry>
- </row>
- <row>
- <entry>256</entry>
- <entry><literal>FLAG_NO_LOCALE</literal></entry>
- <entry>Don't Use Set Locale</entry>
- <entry>Disable the use of extended fetch (experimental).</entry>
- </row>
- <row>
- <entry>512</entry>
- <entry><literal>FLAG_PAD_SPACE</literal></entry>
- <entry>Pad Char To Full Length</entry>
- <entry>Pad <literal>CHAR</literal> columns to full column length.</entry>
- </row>
- <row>
- <entry>1024</entry>
- <entry><literal>FLAG_FULL_COLUMN_NAMES</literal></entry>
- <entry>Return Table Names for SQLDescribeCol</entry>
- <entry><literal>SQLDescribeCol()</literal> returns fully qualified column
- names.</entry>
- </row>
- <row>
- <entry>2048</entry>
- <entry><literal>FLAG_COMPRESSED_PROTO</literal></entry>
- <entry>Use Compressed Protocol</entry>
- <entry>Use the compressed client/server protocol.</entry>
- </row>
- <row>
- <entry>4096</entry>
- <entry><literal>FLAG_IGNORE_SPACE</literal></entry>
- <entry>Ignore Space After Function Names</entry>
- <entry>Tell server to ignore space after function name and before
- <quote><literal>(</literal></quote> (needed by
- PowerBuilder). This makes all function names keywords.</entry>
- </row>
- <row>
- <entry>8192</entry>
- <entry><literal>FLAG_NAMED_PIPE</literal></entry>
- <entry>Force Use of Named Pipes</entry>
- <entry>Connect with named pipes to a <command>mysqld</command> server running
- on NT.</entry>
- </row>
- <row>
- <entry>16384</entry>
- <entry><literal>FLAG_NO_BIGINT</literal></entry>
- <entry>Change BIGINT Columns to Int</entry>
- <entry>Change <literal>BIGINT</literal> columns to <literal>INT</literal>
- columns (some applications can't handle
- <literal>BIGINT</literal>).</entry>
- </row>
- <row>
- <entry>32768</entry>
- <entry><literal>FLAG_NO_CATALOG</literal></entry>
- <entry>No Catalog</entry>
- <entry>Forces results from the catalog functions, such as
- <literal>SQLTables</literal>, to always return
- <literal>NULL</literal> and the driver to report that
- catalogs are not supported.</entry>
- </row>
- <row>
- <entry>65536</entry>
- <entry><literal>FLAG_USE_MYCNF</literal></entry>
- <entry>Read Options From <literal>my.cnf</literal></entry>
- <entry>Read parameters from the <literal>[client]</literal> and
- <literal>[odbc]</literal> groups from
- <filename>my.cnf</filename>.</entry>
- </row>
- <row>
- <entry>131072</entry>
- <entry><literal>FLAG_SAFE</literal></entry>
- <entry>Safe</entry>
- <entry>Add some extra safety checks.</entry>
- </row>
- <row>
- <entry>262144</entry>
- <entry><literal>FLAG_NO_TRANSACTIONS</literal></entry>
- <entry>Disable transactions</entry>
- <entry>Disable transactions.</entry>
- </row>
- <row>
- <entry>524288</entry>
- <entry><literal>FLAG_LOG_QUERY</literal></entry>
- <entry>Save queries to <filename>myodbc.sql</filename></entry>
- <entry>Enable query logging to
- <filename>c:\myodbc.sql</filename>(<filename>/tmp/myodbc.sql</filename>)
- file. (Enabled only in debug mode.)</entry>
- </row>
- <row>
- <entry>1048576</entry>
- <entry><literal>FLAG_NO_CACHE</literal></entry>
- <entry>Don't Cache Result (forward only cursors)</entry>
- <entry>Do not cache the results locally in the driver, instead read from server
- (<function role="capi">mysql_use_result()</function>).
- This works only for forward-only cursors. This option is
- very important in dealing with large tables when you
- don't want the driver to cache the entire result set.</entry>
- </row>
- <row>
- <entry>2097152</entry>
- <entry><literal>FLAG_FORWARD_CURSOR</literal></entry>
- <entry>Force Use Of Forward Only Cursors</entry>
- <entry>Force the use of <literal>Forward-only</literal> cursor type. In case of
- applications setting the default static/dynamic cursor
- type, and one wants the driver to use non-cache result
- sets, then this option ensures the forward-only cursor
- behavior.</entry>
- </row>
- <row>
- <entry>4194304</entry>
- <entry><literal>FLAG_AUTO_RECONNECT</literal></entry>
- <entry>Enable auto-reconnect.</entry>
- <entry>Enables auto-reconnection functionality. You should not use this option
- with transactions, since a auto reconnection during a
- incomplete transaction may cause corruption. Note that
- an auto-reconnected connection will not inherit the same
- settings and environment as the original. This option
- was enabled in Connector/ODBC 3.5.13.</entry>
- </row>
- <row>
- <entry>8388608</entry>
- <entry><literal>FLAG_AUTO_IS_NULL</literal></entry>
- <entry>Flag Auto Is Null</entry>
- <entry>When set, this option causes the connection to set the
- <literal>SQL_AUTO_IS_NULL</literal> option to 1. This
- disables the standard behavior, but may enable older
- applications to correctly identify
- <literal>AUTO_INCREMENT</literal> values. For more
- information. See
- <link linkend="operator_is-null"><literal>IS
- NULL</literal></link> This option was enabled in
- Connector/ODBC 3.5.13.</entry>
- </row>
- <row>
- <entry>16777216</entry>
- <entry><literal>FLAG_ZERO_DATE_TO_MIN</literal></entry>
- <entry>Flag Zero Date to Min</entry>
- <entry>Translates zero dates (<literal>XXXX-00-00</literal>) into the minimum
- date values supported by ODBC,
- <literal>XXXX-01-01</literal>. This resolves an issue
- where some statement swill not work because the date
- returned and the minimumd ODBC date value are
- incompatible.This option was enabled in Connector/ODBC
- 3.5.17.</entry>
- </row>
- <row>
- <entry>33554432</entry>
- <entry><literal>FLAG_MIN_DATE_TO_ZERO</literal></entry>
- <entry>Flag Min Date to Zero</entry>
- <entry>Translates the minimum ODBC date value (<literal>XXXX-01-01</literal>)
- to the zero date format supported by MySQL
- (<literal>XXXX-00-00</literal>). This resolves an issue
- where some statement swill not work because the date
- returned and the minimumd ODBC date value are
- incompatible. This option was enabled in Connector/ODBC
- 3.5.17.</entry>
- </row>
- <row>
- <entry>67108864</entry>
- <entry><literal>FLAG_MULTI_STATEMENTS</literal></entry>
- <entry>Allow multiple statements</entry>
- <entry>Enables support for batched statements. This option was enabled in
- Connector/ODBC 3.5.18.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- To select multiple options, add together their values. For
- example, setting <literal>option</literal> to 12 (4+8) gives you
- debugging without packet limits.
- </para>
-
- <para>
- The following table shows some recommended
- <literal>option</literal> values for various configurations:
- </para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colwidth="85*"/>
- <colspec colwidth="15*"/>
- <tbody>
- <row>
- <entry><emphasis role="bold">Configuration</emphasis></entry>
- <entry><emphasis role="bold">Option Value</emphasis></entry>
- </row>
- <row>
- <entry>Microsoft Access, Visual Basic</entry>
- <entry>3</entry>
- </row>
- <row>
- <entry>Driver trace generation (Debug mode)</entry>
- <entry>4</entry>
- </row>
- <row>
- <entry>Microsoft Access (with improved DELETE queries)</entry>
- <entry>35</entry>
- </row>
- <row>
- <entry>Large tables with too many rows</entry>
- <entry>2049</entry>
- </row>
- <row>
- <entry>Sybase PowerBuilder</entry>
- <entry>135168</entry>
- </row>
- <row>
- <entry>Query log generation (Debug mode)</entry>
- <entry>524288</entry>
- </row>
- <row>
- <entry>Generate driver trace as well as query log (Debug mode)</entry>
- <entry>524292</entry>
- </row>
- <row>
- <entry>Large tables with no-cache results</entry>
- <entry>3145731</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- </section>
-
<section id="myodbc-configuration-connection-without-dsn">
<title>Connecting Without a Predefined DSN</title>
Modified: trunk/refman-common/news-cnet-core.xml
===================================================================
--- trunk/refman-common/news-cnet-core.xml 2007-11-13 03:15:50 UTC (rev 8669)
+++ trunk/refman-common/news-cnet-core.xml 2007-11-13 11:22:22 UTC (rev 8670)
Changed blocks: 2, Lines Added: 16, Lines Deleted: 0; 1067 bytes
@@ -19,6 +19,14 @@
<remark role="dynamic-dependency-list"/>
+ <section id="connector-net-news-5-1-4">
+
+ <title condition="dynamic:changelog:vertitle" role="5.1.4:connector-net:all"/>
+
+ <para condition="dynamic:changelog:entrylist" role="5.1.4:connector-net:all"/>
+
+ </section>
+
<section id="connector-net-news-5-1-3">
<title condition="dynamic:changelog:vertitle" role="5.1.3:connector-net:all"/>
@@ -51,6 +59,14 @@
</section>
+ <section id="connector-net-news-5-0-9">
+
+ <title condition="dynamic:changelog:vertitle" role="5.0.9:connector-net:all"/>
+
+ <para condition="dynamic:changelog:entrylist" role="5.0.9:connector-net:all"/>
+
+ </section>
+
<section id="connector-net-news-5-0-8">
<title condition="dynamic:changelog:vertitle" role="5.0.8:connector-net:all"/>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r8670 - in trunk: dynamic-docs/changelog refman-common | mcbrown | 13 Nov |