The following section details some common errors and their suggested fix or alternative solution. If you are still experiencing problems, use the Connector/ODBC mailing list; see Sección 25.1.7.1, “Connector/ODBC Community Support”.
Many problems can be resolved by upgrading your Connector/ODBC drivers to the latest available release. On Windows, you should also make sure that you have the latest versions of the Microsoft Data Access Components (MDAC) installed.
Questions
25.1.6.3.1: Are MyODBC 2.50 applications compatible with Connector/ODBC 3.51?
25.1.6.3.2:
I have installed Connector/ODBC on Windows XP x64 Edition
or Windows Server 2003 R2 x64. The installation completed
successfully, but the Connector/ODBC driver does not
appear in ODBC Data Source
Administrator
.
25.1.6.3.3:
When connecting or using the Test
button in ODBC Data Source
Administrator
I get error 10061 (Cannot connect
to server)
25.1.6.3.4:
The following error is reported when using transactions:
Transactions are not enabled
25.1.6.3.5:
The following error is reported when I submit a query:
Cursor not found
25.1.6.3.6:
Access reports records as #DELETED#
when inserting or updating records in linked tables.
25.1.6.3.7: How do I handle Write Conflicts or Row Location errors?
25.1.6.3.8:
Exporting data from Access 97 to MySQL reports a
Syntax Error
.
25.1.6.3.9:
Exporting data from Microsoft DTS to MySQL reports a
Syntax Error
.
25.1.6.3.10: Using ODBC.NET with Connector/ODBC, while fetching empty string (0 length), it starts giving the SQL_NO_DATA exception.
25.1.6.3.11:
Using SELECT COUNT(*) FROM
within
Visual Basic and ASP returns an error.
tbl_name
25.1.6.3.12:
Using the AppendChunk()
or
GetChunk()
ADO methods, the
Multiple-step operation generated errors. Check
each status value
error is returned.
25.1.6.3.13:
Access Returns Another user had modified the
record that you have modified
while editing
records on a Linked Table.
25.1.6.3.14: When linking an application directly to the Connector/ODBC library under Unix/Linux, the application crashes.
25.1.6.3.15:
Applications in the Microsoft Office suite are unable to
update tables that have DATE
or
TIMESTAMP
columns.
Questions and Answers
25.1.6.3.1: Are MyODBC 2.50 applications compatible with Connector/ODBC 3.51?
Applications based on MyODBC 2.50 should work fine with Connector/ODBC 3.51 and later versions. If you find something is not working with the latest version of Connector/ODBC which previously worked under an earlier version, please file a bug report. See Sección 25.1.7.2, “How to Report Connector/ODBC Problems or Bugs”.
25.1.6.3.2:
I have installed Connector/ODBC on Windows XP x64 Edition
or Windows Server 2003 R2 x64. The installation completed
successfully, but the Connector/ODBC driver does not
appear in ODBC Data Source
Administrator
.
This is not a bug, but is related to the way Windows x64
editions operate with the ODBC driver. On Windows x64
editions, the Connector/ODBC driver is installed in the
%SystemRoot%\SysWOW64
folder.
However, the default ODBC Data Source
Administrator
that is available through the
Administrative Tools
or
Control Panel
in Windows x64 Editions
is located in the
%SystemRoot%\system32
folder, and
only searches this folder for ODBC drivers.
On Windowx x64 editions, you should use the ODBC
administration tool located at
%SystemRoot%\SysWOW64\odbcad32.exe
,
this will correctly locate the installed Connector/ODBC
drivers and enable you to create a Connector/ODBC DSN.
This issue was originally reported as Bug#20301.
25.1.6.3.3:
When connecting or using the Test
button in ODBC Data Source
Administrator
I get error 10061 (Cannot connect
to server)
This error can be raised by a number of different issues,
including server problems, network problems, and firewall
and port blocking problems. For more information, see
Sección A.2.2, “Can't connect to [local] MySQL server
”.
25.1.6.3.4:
The following error is reported when using transactions:
Transactions are not enabled
This error indicates that you are trying to use
transactions with a MySQL table that does not support
transactions. Transactions are supported within MySQL when
using the InnoDB
database engine. In
versions of MySQL before Mysql 5.1 you may also use the
BDB
engine.
You should check the following before continuing:
Verify that your MySQL server supports a transactional
database engine. Use SHOW ENGINES
to obtain a list of the available engine types.
Verify that the tables you are updating use a transaction database engine.
Ensure that you have not enabled the disable
transactions
option in your DSN.
25.1.6.3.5:
The following error is reported when I submit a query:
Cursor not found
This occurs because the application is using the old MyODBC 2.50 version, and it did not set the cursor name explicitly through SQLSetCursorName. The fix is to upgrade to Connector/ODBC 3.51 version.
25.1.6.3.6:
Access reports records as #DELETED#
when inserting or updating records in linked tables.
If the inserted or updated records are shown as
#DELETED#
in the access, then:
If you are using Access 2000, you should get and
install the newest (version 2.6 or higher) Microsoft
MDAC (Microsoft Data Access
Components
) from
http://www.microsoft.com/data/. This
fixes a bug in Access that when you export data to
MySQL, the table and column names aren't specified.
Another way to work around this bug is to upgrade to
MyODBC 2.50.33 or higher and MySQL 3.23.x or higher,
which together provide a workaround for the problem.
You should also get and apply the Microsoft Jet 4.0
Service Pack 5 (SP5) which can be found at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q239114.
This fixes some cases where columns are marked as
#DELETED#
in Access.
Note: If you are using MySQL 3.22, you must apply the MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work around this problem.
For all versions of Access, you should enable the
Connector/ODBC Return matching rows
option. For Access 2.0, you should additionally enable
the Simulate ODBC 1.0
option.
You should have a timestamp in all tables that you want to be able to update.
You should have a primary key in the table. If not,
new or updated rows may show up as
#DELETED#
.
Use only DOUBLE
float fields.
Access fails when comparing with single-precision
floats. The symptom usually is that new or updated
rows may show up as #DELETED#
or
that you can't find or update rows.
If you are using Connector/ODBC to link to a table
that has a BIGINT
column, the
results are displayed as #DELETED
.
The work around solution is:
Have one more dummy column with
TIMESTAMP
as the data type.
Select the Change BIGINT columns to
INT
option in the connection dialog in
ODBC DSN Administrator.
Delete the table link from Access and re-create it.
Old records still display as
#DELETED#
, but newly added/updated
records are displayed properly.
25.1.6.3.7: How do I handle Write Conflicts or Row Location errors?
If you see the following errors, select the
Return Matching Rows
option in the DSN
configuration dialog, or specify
OPTION=2
, as the connection parameter:
Write Conflict. Another user has changed your data. Row cannot be located for updating. Some values may have been changed since it was last read.
25.1.6.3.8:
Exporting data from Access 97 to MySQL reports a
Syntax Error
.
This error is specific to Access 97 and versions of Connector/ODBC earlier than 3.51.02. Update to the latest version of the Connector/ODBC driver to resolve this problem.
25.1.6.3.9:
Exporting data from Microsoft DTS to MySQL reports a
Syntax Error
.
This error occurs only with MySQL tables using the
TEXT
or VARCHAR
data
types. You can fix this error by upgrading your
Connector/ODBC driver to version 3.51.02 or higher.
25.1.6.3.10: Using ODBC.NET with Connector/ODBC, while fetching empty string (0 length), it starts giving the SQL_NO_DATA exception.
You can get the patch that addresses this problem from http://support.microsoft.com/default.aspx?scid=kb;EN-US;q319243.
25.1.6.3.11:
Using SELECT COUNT(*) FROM
within
Visual Basic and ASP returns an error.
tbl_name
This error occurs because the COUNT(*)
expression is returning a BIGINT
, and
ADO can't make sense of a number this big. Select the
Change BIGINT columns to INT
option
(option value 16384).
25.1.6.3.12:
Using the AppendChunk()
or
GetChunk()
ADO methods, the
Multiple-step operation generated errors. Check
each status value
error is returned.
The GetChunk()
and
AppendChunk()
methods from ADO doesn't
work as expected when the cursor location is specified as
adUseServer
. On the other hand, you can
overcome this error by using
adUseClient
.
A simple example can be found from http://www.dwam.net/iishelp/ado/docs/adomth02_4.htm
25.1.6.3.13:
Access Returns Another user had modified the
record that you have modified
while editing
records on a Linked Table.
In most cases, this can be solved by doing one of the following things:
Add a primary key for the table if one doesn't exist.
Add a timestamp column if one doesn't exist.
Only use double-precision float fields. Some programs may fail when they compare single-precision floats.
If these strategies don't help, you should start by making a log file from the ODBC manager (the log you get when requesting logs from ODBCADMIN) and a Connector/ODBC log to help you figure out why things go wrong. For instructions, see Sección 25.1.3.8, “Getting an ODBC Trace File”.
25.1.6.3.14: When linking an application directly to the Connector/ODBC library under Unix/Linux, the application crashes.
Connector/ODBC 3.51 under Unix/Linux is not compatible with direct application linking. You must use a driver manager, such as iODBC or unixODBC to connect to an ODBC source.
25.1.6.3.15:
Applications in the Microsoft Office suite are unable to
update tables that have DATE
or
TIMESTAMP
columns.
This is a known issue with Connector/ODBC. You must ensure
that the field has a default value (rather than
NULL
and that the default value is
non-zeo (i.e. the default value is not 0000-00-00
00:00:00
).
Ésta es una traducción del manual de referencia de MySQL, que puede encontrarse en dev.mysql.com. El manual de referencia original de MySQL está escrito en inglés, y esta traducción no necesariamente está tan actualizada como la versión original. Para cualquier sugerencia sobre la traducción y para señalar errores de cualquier tipo, no dude en dirigirse a mysql-es@vespito.com.