Author: mcbrown
Date: 2007-02-10 18:19:48 +0100 (Sat, 10 Feb 2007)
New Revision: 4889
Log:
Restructuring C/ODBC and adding a key topics section to the intro
Modified:
trunk/refman-4.1/renamed-nodes.txt
trunk/refman-5.0/renamed-nodes.txt
trunk/refman-5.1/renamed-nodes.txt
trunk/refman-common/connector-odbc.xml
Modified: trunk/refman-4.1/renamed-nodes.txt
===================================================================
--- trunk/refman-4.1/renamed-nodes.txt 2007-02-10 16:47:13 UTC (rev 4888)
+++ trunk/refman-4.1/renamed-nodes.txt 2007-02-10 17:19:48 UTC (rev 4889)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 449 bytes
@@ -300,3 +300,4 @@
nutshell-4-1-features mysql-4-1-nutshell
table-size full-table
year-2000-compliance y2k-issues
+myodbc-examples-tools-tested myodbc-examples-tools
\ No newline at end of file
Modified: trunk/refman-5.0/renamed-nodes.txt
===================================================================
--- trunk/refman-5.0/renamed-nodes.txt 2007-02-10 16:47:13 UTC (rev 4888)
+++ trunk/refman-5.0/renamed-nodes.txt 2007-02-10 17:19:48 UTC (rev 4889)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 405 bytes
@@ -640,4 +640,4 @@
stored-procedure-replication-faq faqs-stored-routines-triggers-replication
-
+myodbc-examples-tools-tested myodbc-examples-tools
Modified: trunk/refman-5.1/renamed-nodes.txt
===================================================================
--- trunk/refman-5.1/renamed-nodes.txt 2007-02-10 16:47:13 UTC (rev 4888)
+++ trunk/refman-5.1/renamed-nodes.txt 2007-02-10 17:19:48 UTC (rev 4889)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 1; 572 bytes
@@ -367,4 +367,5 @@
federated-limitations federated-usagenotes
mysqld-max mysqld
replication-upgrade-5-1 replication-upgrade
-replication-row-based replication-formats
\ No newline at end of file
+replication-row-based replication-formats
+myodbc-examples-tools-tested myodbc-examples-tools
\ No newline at end of file
Modified: trunk/refman-common/connector-odbc.xml
===================================================================
--- trunk/refman-common/connector-odbc.xml 2007-02-10 16:47:13 UTC (rev 4888)
+++ trunk/refman-common/connector-odbc.xml 2007-02-10 17:19:48 UTC (rev 4889)
Changed blocks: 2, Lines Added: 564, Lines Deleted: 515; 43011 bytes
@@ -78,10 +78,71 @@
</para>
<para>
- If you have questions that are not answered in this document, please
- send a mail message to <email>myodbc@stripped</email>.
+ <emphasis role="bold">Key topics:</emphasis>
</para>
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ For help installing Connector/ODBC see
+ <xref
+ linkend="myodbc-installation"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For more information on connecting to a MySQL database from a
+ Windows host using Connector/ODBC see
+ <xref
+ linkend="myodbc-examples-walkthrough"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ If you want to use Microsoft Access as an interface to a MySQL
+ database using Connector/ODBC see
+ <xref
+ linkend="myodbc-examples-tools-with-access"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ General tips on using Connector/ODBC, including obtaining the
+ last auto increment ID see
+ <xref
+ linkend="myodbc-usagenotes-functionality"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For tips and common questions on using Connector/ODBC with
+ specific application see
+ <xref linkend="myodbc-usagenotes-apptips"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For a general list of Frequently Asked Questions see
+ <xref
+ linkend="myodbc-errors"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Additional support when using Connector/ODBC is available, see
+ <xref linkend="myodbc-support"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
<section id="myodbc-introduction">
<title>Introduction to Connector/ODBC</title>
@@ -4014,635 +4075,623 @@
Adobe/Macromedia ColdFusion.
</para>
- <section id="myodbc-examples-tools-tested">
+ <para>
+ Connector/ODBC has been tested with the following applications:
+ </para>
- <title>Applications Tested with Connector/ODBC</title>
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="25*" colname="c1"/>
+ <colspec colwidth="25*" colname="c2"/>
+ <colspec colwidth="50*" colname="c3"/>
+ <tbody>
+ <row>
+ <entry><emphasis role="bold">Publisher</emphasis></entry>
+ <entry><emphasis role="bold">Application</emphasis></entry>
+ <entry><emphasis role="bold">Notes</emphasis></entry>
+ </row>
+ <row>
+ <entry>Adobe</entry>
+ <entry>ColdFusion</entry>
+ <entry>Formerly Macromedia ColdFusion</entry>
+ </row>
+ <row>
+ <entry rowsep="0">Borland</entry>
+ <entry>C++ Builder</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>Builder 4</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry/>
+ <entry>Delphi</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>Business Objects</entry>
+ <entry>Crystal Reports</entry>
+ </row>
+ <row>
+ <entry>Claris</entry>
+ <entry>Filemaker Pro</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>Corel</entry>
+ <entry>Paradox</entry>
+ </row>
+ <row>
+ <entry rowsep="0">Computer Associates</entry>
+ <entry>Visual Objects</entry>
+ <entry>Also known as CAVO</entry>
+ </row>
+ <row>
+ <entry/>
+ <entry>AllFusion ERwin Data Modeler</entry>
+ </row>
+ <row>
+ <entry>Gupta</entry>
+ <entry>Team Developer</entry>
+ <entry>Previously known as Centura Team Developer; Gupta SQL/Windows</entry>
+ </row>
+ <row>
+ <entry>Gensym</entry>
+ <entry>G2-ODBC Bridge</entry>
+ </row>
+ <row>
+ <entry>Inline</entry>
+ <entry>iHTML</entry>
+ </row>
+ <row>
+ <entry>Lotus</entry>
+ <entry>Notes</entry>
+ <entry>Versions 4.5 and 4.6</entry>
+ </row>
+ <row>
+ <entry rowsep="0">Microsoft</entry>
+ <entry>Access</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>Excel</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>Visio Enterprise</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>Visual C++</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>Visual Basic</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>ODBC.NET</entry>
+ <entry>Using C#, Visual Basic, C++</entry>
+ </row>
+ <row>
+ <entry rowsep="0"/>
+ <entry>FoxPro</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry/>
+ <entry>Visual Interdev</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>OpenOffice.org</entry>
+ <entry>OpenOffice.org</entry>
+ </row>
+ <row>
+ <entry>Perl</entry>
+ <entry>DBD::ODBC</entry>
+ </row>
+ <row>
+ <entry>Pervasive Software</entry>
+ <entry>DataJunction</entry>
+ </row>
+ <row>
+ <entry>Sambar Technologies</entry>
+ <entry>Sambar Server</entry>
+ </row>
+ <row>
+ <entry>SPSS</entry>
+ <entry>SPSS</entry>
+ </row>
+ <row>
+ <entry>SoftVelocity</entry>
+ <entry>Clarion</entry>
+ </row>
+ <row>
+ <entry>SQLExpress</entry>
+ <entry>SQLExpress for Xbase++</entry>
+ </row>
+ <row>
+ <entry>Sun</entry>
+ <entry>StarOffice</entry>
+ </row>
+ <row>
+ <entry>SunSystems</entry>
+ <entry>Vision</entry>
+ </row>
+ <row>
+ <entry rowsep="0">Sybase</entry>
+ <entry>PowerBuilder</entry>
+ </row>
+ <row>
+ <entry/>
+ <entry>PowerDesigner</entry>
+ </row>
+ <row>
+ <entry>theKompany.com</entry>
+ <entry>Data Architect</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
- <para>
- Connector/ODBC has been tested with the following
- applications:
- </para>
+ <para>
+ If you know of any other applications that work with
+ Connector/ODBC, please send mail to
+ <email>myodbc@stripped</email> about them.
+ </para>
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="25*" colname="c1"/>
- <colspec colwidth="25*" colname="c2"/>
- <colspec colwidth="50*" colname="c3"/>
- <tbody>
- <row>
- <entry><emphasis role="bold">Publisher</emphasis></entry>
- <entry><emphasis role="bold">Application</emphasis></entry>
- <entry><emphasis role="bold">Notes</emphasis></entry>
- </row>
- <row>
- <entry>Adobe</entry>
- <entry>ColdFusion</entry>
- <entry>Formerly Macromedia ColdFusion</entry>
- </row>
- <row>
- <entry rowsep="0">Borland</entry>
- <entry>C++ Builder</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>Builder 4</entry>
- <entry/>
- </row>
- <row>
- <entry/>
- <entry>Delphi</entry>
- <entry/>
- </row>
- <row>
- <entry>Business Objects</entry>
- <entry>Crystal Reports</entry>
- </row>
- <row>
- <entry>Claris</entry>
- <entry>Filemaker Pro</entry>
- <entry/>
- </row>
- <row>
- <entry>Corel</entry>
- <entry>Paradox</entry>
- </row>
- <row>
- <entry rowsep="0">Computer Associates</entry>
- <entry>Visual Objects</entry>
- <entry>Also known as CAVO</entry>
- </row>
- <row>
- <entry/>
- <entry>AllFusion ERwin Data Modeler</entry>
- </row>
- <row>
- <entry>Gupta</entry>
- <entry>Team Developer</entry>
- <entry>Previously known as Centura Team Developer; Gupta SQL/Windows</entry>
- </row>
- <row>
- <entry>Gensym</entry>
- <entry>G2-ODBC Bridge</entry>
- </row>
- <row>
- <entry>Inline</entry>
- <entry>iHTML</entry>
- </row>
- <row>
- <entry>Lotus</entry>
- <entry>Notes</entry>
- <entry>Versions 4.5 and 4.6</entry>
- </row>
- <row>
- <entry rowsep="0">Microsoft</entry>
- <entry>Access</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>Excel</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>Visio Enterprise</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>Visual C++</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>Visual Basic</entry>
- <entry/>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>ODBC.NET</entry>
- <entry>Using C#, Visual Basic, C++</entry>
- </row>
- <row>
- <entry rowsep="0"/>
- <entry>FoxPro</entry>
- <entry/>
- </row>
- <row>
- <entry/>
- <entry>Visual Interdev</entry>
- <entry/>
- </row>
- <row>
- <entry>OpenOffice.org</entry>
- <entry>OpenOffice.org</entry>
- </row>
- <row>
- <entry>Perl</entry>
- <entry>DBD::ODBC</entry>
- </row>
- <row>
- <entry>Pervasive Software</entry>
- <entry>DataJunction</entry>
- </row>
- <row>
- <entry>Sambar Technologies</entry>
- <entry>Sambar Server</entry>
- </row>
- <row>
- <entry>SPSS</entry>
- <entry>SPSS</entry>
- </row>
- <row>
- <entry>SoftVelocity</entry>
- <entry>Clarion</entry>
- </row>
- <row>
- <entry>SQLExpress</entry>
- <entry>SQLExpress for Xbase++</entry>
- </row>
- <row>
- <entry>Sun</entry>
- <entry>StarOffice</entry>
- </row>
- <row>
- <entry>SunSystems</entry>
- <entry>Vision</entry>
- </row>
- <row>
- <entry rowsep="0">Sybase</entry>
- <entry>PowerBuilder</entry>
- </row>
- <row>
- <entry/>
- <entry>PowerDesigner</entry>
- </row>
- <row>
- <entry>theKompany.com</entry>
- <entry>Data Architect</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ </section>
- <para>
- If you know of any other applications that work with
- Connector/ODBC, please send mail to
- <email>myodbc@stripped</email> about them.
- </para>
+ <section id="myodbc-examples-tools-with-access">
- </section>
+ <title>Using Connector/ODBC and Microsoft Access</title>
- <section id="myodbc-examples-tools-with-wordexcel">
+ <para>
+ You can use MySQL database with Microsoft Access using
+ Connector/ODBC. The MySQL database can be used as an import
+ source, an export source, or as a linked table for direct use
+ within an Access application, so you can use Access as the
+ front-end interface to a MySQL database.
+ </para>
- <title>Using Connector/ODBC with Microsoft Word or Excel</title>
+ <section id="myodbc-examples-tools-with-access-export">
- <para>
- You can use Microsoft Word and Microsoft Excel to access
- information from a MySQL database using Connector/ODBC. Within
- Microsoft Word, this facility is most useful when importing
- data for mailmerge, or for tables and data to be included in
- reports. Within Microsoft Excel, you can execute queries on
- your MySQL server and import the data directly into an Excel
- Worksheet, presenting the data as a series of rows and
- columns.
- </para>
+ <title>Exporting Access Data to MySQL</title>
<para>
- With both applications, data is accessed and imported into the
- application using
-
- <application>Microsoft Query</application>
-
- , which enables you to execute a query though an ODBC source.
- You use Microsoft Query to build the SQL statement to be
- executed, selecting the tables, fields, selection criteria and
- sort order. For example, to insert information from a table in
- the World test database into an Excel spreadsheet, using the
- DSN samples shown in
- <xref
- linkend="myodbc-configuration"/>:
+ To export a table of data from an Access database to MySQL,
+ follow these instructions:
</para>
<orderedlist>
<listitem>
<para>
- Create a new Worksheet.
+ When you open an Access database or an Access project, a
+ Database window appears. It displays shortcuts for
+ creating new database objects and opening existing
+ objects.
</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myaccess.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Access Database</phrase>
+ </textobject>
+ </mediaobject>
</listitem>
<listitem>
<para>
- From the <literal>Data</literal> menu, choose
- <literal>Import External Data</literal>, and then select
- <literal>New Database Query</literal>.
+ Click the name of the <literal>table</literal> or
+ <literal>query</literal> you want to export, and then in
+ the <literal>File</literal> menu, select
+ <literal>Export</literal>.
</para>
</listitem>
<listitem>
<para>
- <application>Microsoft Query</application>
-
- will start. First, you need to choose the data source, by
- selecting an existing Data Source Name.
+ In the <literal>Export Object Type <replaceable>Object
+ name</replaceable> To</literal> dialog box, in the
+ <literal>Save As Type</literal> box, select <literal>ODBC
+ Databases ()</literal> as shown here:
</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/myodbc-excel-step1.png" format="PNG"
- />
+ <imagedata fileref="images/myaccess-odbc.png" format="PNG"/>
</imageobject>
<textobject>
- <phrase lang="en">Microsoft Query, Choose Data
- Source</phrase>
+ <phrase lang="en">Selecting an ODBC Database</phrase>
</textobject>
</mediaobject>
</listitem>
<listitem>
<para>
- Within the <literal>Query Wizard</literal>, you must
- choose the columns that you want to import. The list of
- tables available to the user configured through the DSN is
- shown on the left, the columns that will be added to your
- query are shown on the right. The columns you choose are
- equivalent to those in the first section of a
- <literal>SELECT</literal> query. Click
- <guibutton>Next</guibutton> to continue.
+ In the <literal>Export</literal> dialog box, enter a name
+ for the file (or use the suggested name), and then select
+ <literal>OK</literal>.
</para>
+ </listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myodbc-excel-step2.png" format="PNG"
- />
- </imageobject>
- <textobject>
- <phrase lang="en">Microsoft Query, Choose
- Columns</phrase>
- </textobject>
- </mediaobject>
+ <listitem>
+ <para>
+ The Select Data Source dialog box is displayed; it lists
+ the defined data sources for any ODBC drivers installed on
+ your computer. Click either the File Data Source or
+ Machine Data Source tab, and then double-click the
+ Connector/ODBC or Connector/ODBC 3.51 data source that you
+ want to export to. To define a new data source for
+ Connector/ODBC, please
+ <xref
+ linkend="myodbc-configuration-dsn-windows"/>.
+ </para>
</listitem>
+ </orderedlist>
+
+ <para>
+ Microsoft Access connects to the MySQL Server through this
+ data source and exports new tables and or data.
+ </para>
+
+ </section>
+
+ <section id="myodbc-examples-tools-with-access-import">
+
+ <title>Importing MySQL Data to Access</title>
+
+ <para>
+ To import or link a table or tables from MySQL to Access,
+ follow these instructions:
+ </para>
+
+ <orderedlist>
+
<listitem>
<para>
- You can filter rows from the query (the equivalent of a
- <literal>WHERE</literal> clause) using the <literal>Filter
- Data</literal> dialog. Click <guibutton>Next</guibutton>
- to continue.
+ Open a database, or switch to the Database window for the
+ open database.
</para>
+ </listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myodbc-excel-step3.png" format="PNG"
- />
- </imageobject>
- <textobject>
- <phrase lang="en">Microsoft Query, Filter Data</phrase>
- </textobject>
- </mediaobject>
+ <listitem>
+ <para>
+ To import tables, on the <literal>File</literal> menu,
+ point to <literal>Get External Data</literal>, and then
+ click <literal>Import</literal>. To link tables, on the
+ File menu, point to <literal>Get External Data</literal>,
+ and then click <literal>Link Tables</literal>.
+ </para>
</listitem>
<listitem>
<para>
- Select an (optional) sort order for the data. This is
- equivalent to using a <literal>ORDER BY</literal> clause
- in your SQL query. You can select up to three fields for
- sorting the information returned by the query. Click
- <guibutton>Next</guibutton> to continue.
+ In the <literal>Import</literal> (or
+ <literal>Link</literal>) dialog box, in the Files Of Type
+ box, select <literal>ODBC Databases ()</literal>. The
+ Select Data Source dialog box lists the defined data
+ sources The Select Data Source dialog box is displayed; it
+ lists the defined data source names.
</para>
+ </listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myodbc-excel-step4.png" format="PNG"
- />
- </imageobject>
- <textobject>
- <phrase lang="en">Microsoft Query, Sort Order</phrase>
- </textobject>
- </mediaobject>
+ <listitem>
+ <para>
+ If the ODBC data source that you selected requires you to
+ log on, enter your login ID and password (additional
+ information might also be required), and then click
+ <literal>OK</literal>.
+ </para>
</listitem>
<listitem>
<para>
- Select the destination for your query. You can select to
- return the data Microsoft Excel, where you can choose a
- worksheet and cell where the data will be inserted; you
- can continue to view the query and results within
- Microsoft Query, where you can edit the SQL query and
- further filter and sort the information returned; or you
- can create an OLAP Cube from the query, which can then be
- used directly within Microsoft Excel. Click
- <guibutton>Finish</guibutton>.
+ Microsoft Access connects to the MySQL server through
+ <literal>ODBC data source </literal> and displays the list
+ of tables that you can <literal>import</literal> or
+ <literal>link</literal>.
</para>
+ </listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myodbc-excel-step5.png" format="PNG"
- />
- </imageobject>
- <textobject>
- <phrase lang="en">Microsoft Query, Selecting a
- destination</phrase>
- </textobject>
- </mediaobject>
+ <listitem>
+ <para>
+ Click each table that you want to
+ <literal>import</literal> or <literal>link</literal>, and
+ then click <literal>OK</literal>. If you're linking a
+ table and it doesn't have an index that uniquely
+ identifies each record, Microsoft Access displays a list
+ of the fields in the linked table. Click a field or a
+ combination of fields that uniquely identifies each
+ record, and then click <literal>OK</literal>.
+ </para>
</listitem>
</orderedlist>
- <para>
- The same process can be used to import data into a Word
- document, where the data will be inserted as a table. This can
- be used for mail merge purposes (where the field data is read
- from a Word table), or where you want to include data and
- reports within a report or other document.
- </para>
-
</section>
- <section id="myodbc-examples-tools-with-access">
+ <section id="myodbc-examples-tools-with-access-linked-tables">
- <title>Using Connector/ODBC and Microsoft Access</title>
+ <title>Linking MySQL Data to Access Tables</title>
<para>
- You can use MySQL database with Microsoft Access using
- Connector/ODBC. The MySQL database can be used as an import
- source, an export source, or as a linked table for direct use
- within an Access application, so you can use Access as the
- front-end interface to a MySQL database.
+ Use the following procedure to view or to refresh links when
+ the structure or location of a linked table has changed. The
+ Linked Table Manager lists the paths to all currently linked
+ tables.
</para>
- <section id="myodbc-examples-tools-with-access-export">
+ <para>
+ <emphasis role="bold">To view or refresh links</emphasis>:
+ </para>
- <title>Exporting Access Data to MySQL</title>
+ <orderedlist>
- <para>
- To export a table of data from an Access database to MySQL,
- follow these instructions:
- </para>
+ <listitem>
+ <para>
+ Open the database that contains links to tables.
+ </para>
+ </listitem>
- <orderedlist>
+ <listitem>
+ <para>
+ On the <literal>Tools</literal> menu, point to
+ <literal>Add-ins</literal> (<literal>Database
+ Utilities</literal> in Access 2000 or newer), and then
+ click <literal>Linked Table Manager</literal>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- When you open an Access database or an Access project, a
- Database window appears. It displays shortcuts for
- creating new database objects and opening existing
- objects.
- </para>
+ <listitem>
+ <para>
+ Select the check box for the tables whose links you want
+ to refresh.
+ </para>
+ </listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myaccess.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase lang="en">Access Database</phrase>
- </textobject>
- </mediaobject>
- </listitem>
+ <listitem>
+ <para>
+ Click OK to refresh the links.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Click the name of the <literal>table</literal> or
- <literal>query</literal> you want to export, and then in
- the <literal>File</literal> menu, select
- <literal>Export</literal>.
- </para>
- </listitem>
+ </orderedlist>
- <listitem>
- <para>
- In the <literal>Export Object Type <replaceable>Object
- name</replaceable> To</literal> dialog box, in the
- <literal>Save As Type</literal> box, select
- <literal>ODBC Databases ()</literal> as shown here:
- </para>
+ <para>
+ Microsoft Access confirms a successful refresh or, if the
+ table wasn't found, displays the <literal>Select New Location
+ of</literal> <table name> dialog box in which you can
+ specify its the table's new location. If several selected
+ tables have moved to the new location that you specify, the
+ Linked Table Manager searches that location for all selected
+ tables, and updates all links in one step.
+ </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/myaccess-odbc.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase lang="en">Selecting an ODBC Database</phrase>
- </textobject>
- </mediaobject>
- </listitem>
+ <para>
+ <emphasis role="bold">To change the path for a set of linked
+ tables</emphasis>:
+ </para>
- <listitem>
- <para>
- In the <literal>Export</literal> dialog box, enter a
- name for the file (or use the suggested name), and then
- select <literal>OK</literal>.
- </para>
- </listitem>
+ <orderedlist>
- <listitem>
- <para>
- The Select Data Source dialog box is displayed; it lists
- the defined data sources for any ODBC drivers installed
- on your computer. Click either the File Data Source or
- Machine Data Source tab, and then double-click the
- Connector/ODBC or Connector/ODBC 3.51 data source that
- you want to export to. To define a new data source for
- Connector/ODBC, please
- <xref
- linkend="myodbc-configuration-dsn-windows"/>.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Open the database that contains links to tables.
+ </para>
+ </listitem>
- </orderedlist>
+ <listitem>
+ <para>
+ On the <literal>Tools</literal> menu, point to
+ <literal>Add-ins</literal> (<literal>Database
+ Utilities</literal> in Access 2000 or newer), and then
+ click <literal>Linked Table Manager</literal>.
+ </para>
+ </listitem>
- <para>
- Microsoft Access connects to the MySQL Server through this
- data source and exports new tables and or data.
- </para>
+ <listitem>
+ <para>
+ Select the <literal>Always Prompt For A New
+ Location</literal> check box.
+ </para>
+ </listitem>
- </section>
+ <listitem>
+ <para>
+ Select the check box for the tables whose links you want
+ to change, and then click <literal>OK</literal>.
+ </para>
+ </listitem>
- <section id="myodbc-examples-tools-with-access-import">
+ <listitem>
+ <para>
+ In the <literal>Select New Location of</literal> <table
+ name> dialog box, specify the new location, click
+ <literal>Open</literal>, and then click
+ <literal>OK</literal>.
+ </para>
+ </listitem>
- <title>Importing MySQL Data to Access</title>
+ </orderedlist>
- <para>
- To import or link a table or tables from MySQL to Access,
- follow these instructions:
- </para>
+ </section>
- <orderedlist>
+ </section>
- <listitem>
- <para>
- Open a database, or switch to the Database window for
- the open database.
- </para>
- </listitem>
+ <section id="myodbc-examples-tools-with-wordexcel">
- <listitem>
- <para>
- To import tables, on the <literal>File</literal> menu,
- point to <literal>Get External Data</literal>, and then
- click <literal>Import</literal>. To link tables, on the
- File menu, point to <literal>Get External
- Data</literal>, and then click <literal>Link
- Tables</literal>.
- </para>
- </listitem>
+ <title>Using Connector/ODBC with Microsoft Word or Excel</title>
- <listitem>
- <para>
- In the <literal>Import</literal> (or
- <literal>Link</literal>) dialog box, in the Files Of
- Type box, select <literal>ODBC Databases ()</literal>.
- The Select Data Source dialog box lists the defined data
- sources The Select Data Source dialog box is displayed;
- it lists the defined data source names.
- </para>
- </listitem>
+ <para>
+ You can use Microsoft Word and Microsoft Excel to access
+ information from a MySQL database using Connector/ODBC. Within
+ Microsoft Word, this facility is most useful when importing data
+ for mailmerge, or for tables and data to be included in reports.
+ Within Microsoft Excel, you can execute queries on your MySQL
+ server and import the data directly into an Excel Worksheet,
+ presenting the data as a series of rows and columns.
+ </para>
- <listitem>
- <para>
- If the ODBC data source that you selected requires you
- to log on, enter your login ID and password (additional
- information might also be required), and then click
- <literal>OK</literal>.
- </para>
- </listitem>
+ <para>
+ With both applications, data is accessed and imported into the
+ application using
- <listitem>
- <para>
- Microsoft Access connects to the MySQL server through
- <literal>ODBC data source </literal> and displays the
- list of tables that you can <literal>import</literal> or
- <literal>link</literal>.
- </para>
- </listitem>
+ <application>Microsoft Query</application>
- <listitem>
- <para>
- Click each table that you want to
- <literal>import</literal> or <literal>link</literal>,
- and then click <literal>OK</literal>. If you're linking
- a table and it doesn't have an index that uniquely
- identifies each record, Microsoft Access displays a list
- of the fields in the linked table. Click a field or a
- combination of fields that uniquely identifies each
- record, and then click <literal>OK</literal>.
- </para>
- </listitem>
+ , which enables you to execute a query though an ODBC source.
+ You use Microsoft Query to build the SQL statement to be
+ executed, selecting the tables, fields, selection criteria and
+ sort order. For example, to insert information from a table in
+ the World test database into an Excel spreadsheet, using the DSN
+ samples shown in
+ <xref
+ linkend="myodbc-configuration"/>:
+ </para>
- </orderedlist>
+ <orderedlist>
- </section>
-
- <section id="myodbc-examples-tools-with-access-linked-tables">
-
- <title>Linking MySQL Data to Access Tables</title>
-
+ <listitem>
<para>
- Use the following procedure to view or to refresh links when
- the structure or location of a linked table has changed. The
- Linked Table Manager lists the paths to all currently linked
- tables.
+ Create a new Worksheet.
</para>
+ </listitem>
+ <listitem>
<para>
- <emphasis role="bold">To view or refresh links</emphasis>:
+ From the <literal>Data</literal> menu, choose
+ <literal>Import External Data</literal>, and then select
+ <literal>New Database Query</literal>.
</para>
+ </listitem>
- <orderedlist>
+ <listitem>
+ <para>
+ <application>Microsoft Query</application>
- <listitem>
- <para>
- Open the database that contains links to tables.
- </para>
- </listitem>
+ will start. First, you need to choose the data source, by
+ selecting an existing Data Source Name.
+ </para>
- <listitem>
- <para>
- On the <literal>Tools</literal> menu, point to
- <literal>Add-ins</literal> (<literal>Database
- Utilities</literal> in Access 2000 or newer), and then
- click <literal>Linked Table Manager</literal>.
- </para>
- </listitem>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myodbc-excel-step1.png" format="PNG"
+ />
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Microsoft Query, Choose Data
+ Source</phrase>
+ </textobject>
+ </mediaobject>
+ </listitem>
- <listitem>
- <para>
- Select the check box for the tables whose links you want
- to refresh.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Within the <literal>Query Wizard</literal>, you must choose
+ the columns that you want to import. The list of tables
+ available to the user configured through the DSN is shown on
+ the left, the columns that will be added to your query are
+ shown on the right. The columns you choose are equivalent to
+ those in the first section of a <literal>SELECT</literal>
+ query. Click <guibutton>Next</guibutton> to continue.
+ </para>
- <listitem>
- <para>
- Click OK to refresh the links.
- </para>
- </listitem>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myodbc-excel-step2.png" format="PNG"
+ />
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Microsoft Query, Choose Columns</phrase>
+ </textobject>
+ </mediaobject>
+ </listitem>
- </orderedlist>
-
+ <listitem>
<para>
- Microsoft Access confirms a successful refresh or, if the
- table wasn't found, displays the <literal>Select New
- Location of</literal> <table name> dialog box in which
- you can specify its the table's new location. If several
- selected tables have moved to the new location that you
- specify, the Linked Table Manager searches that location for
- all selected tables, and updates all links in one step.
+ You can filter rows from the query (the equivalent of a
+ <literal>WHERE</literal> clause) using the <literal>Filter
+ Data</literal> dialog. Click <guibutton>Next</guibutton> to
+ continue.
</para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myodbc-excel-step3.png" format="PNG"
+ />
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Microsoft Query, Filter Data</phrase>
+ </textobject>
+ </mediaobject>
+ </listitem>
+
+ <listitem>
<para>
- <emphasis role="bold">To change the path for a set of linked
- tables</emphasis>:
+ Select an (optional) sort order for the data. This is
+ equivalent to using a <literal>ORDER BY</literal> clause in
+ your SQL query. You can select up to three fields for
+ sorting the information returned by the query. Click
+ <guibutton>Next</guibutton> to continue.
</para>
- <orderedlist>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myodbc-excel-step4.png" format="PNG"
+ />
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Microsoft Query, Sort Order</phrase>
+ </textobject>
+ </mediaobject>
+ </listitem>
- <listitem>
- <para>
- Open the database that contains links to tables.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Select the destination for your query. You can select to
+ return the data Microsoft Excel, where you can choose a
+ worksheet and cell where the data will be inserted; you can
+ continue to view the query and results within Microsoft
+ Query, where you can edit the SQL query and further filter
+ and sort the information returned; or you can create an OLAP
+ Cube from the query, which can then be used directly within
+ Microsoft Excel. Click <guibutton>Finish</guibutton>.
+ </para>
- <listitem>
- <para>
- On the <literal>Tools</literal> menu, point to
- <literal>Add-ins</literal> (<literal>Database
- Utilities</literal> in Access 2000 or newer), and then
- click <literal>Linked Table Manager</literal>.
- </para>
- </listitem>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/myodbc-excel-step5.png" format="PNG"
+ />
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Microsoft Query, Selecting a
+ destination</phrase>
+ </textobject>
+ </mediaobject>
+ </listitem>
- <listitem>
- <para>
- Select the <literal>Always Prompt For A New
- Location</literal> check box.
- </para>
- </listitem>
+ </orderedlist>
- <listitem>
- <para>
- Select the check box for the tables whose links you want
- to change, and then click <literal>OK</literal>.
- </para>
- </listitem>
+ <para>
+ The same process can be used to import data into a Word
+ document, where the data will be inserted as a table. This can
+ be used for mail merge purposes (where the field data is read
+ from a Word table), or where you want to include data and
+ reports within a report or other document.
+ </para>
- <listitem>
- <para>
- In the <literal>Select New Location of</literal>
- <table name> dialog box, specify the new location,
- click <literal>Open</literal>, and then click
- <literal>OK</literal>.
- </para>
- </listitem>
-
- </orderedlist>
-
- </section>
-
- </section>
-
</section>
<section id="myodbc-examples-tools-with-crystalreports">
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r4889 - in trunk: refman-4.1 refman-5.0 refman-5.1 refman-common | mcbrown | 10 Feb |