Connector/ODBC Notes and Tips
1806
• Include a
TIMESTAMP
column in all tables that you want to be able to update. For maximum
portability, do not use a length specification in the column declaration (which is unsupported within
MySQL in versions earlier than 4.1).
• Include a
primary key
in each MySQL table you want to use with Access. 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 cannot 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 may still display as
#DELETED#
, but newly added/updated records are displayed
properly.
• If you still get the error
Another user has changed your data
after adding a
TIMESTAMP
column, the following trick may help you:
Do not use a
table
data sheet view. Instead, create a form with the fields you want, and use that
form
data sheet view. Set the
DefaultValue
property for the
TIMESTAMP
column to
NOW()
[926]
.
Consider hiding the
TIMESTAMP
column from view so your users are not confused.
• In some cases, Access may generate SQL statements that MySQL cannot understand. You can fix
this by selecting
"Query|SQLSpecific|Pass-Through"
from the Access menu.
• On Windows NT, Access reports
BLOB
columns as
OLE OBJECTS
. If you want to have
MEMO
columns instead, change
BLOB
columns to
TEXT
with
ALTER TABLE
.
• Access cannot always handle the MySQL
DATE
column properly. If you have a problem with these,
change the columns to
DATETIME
.
• If you have in Access a column defined as
BYTE
, Access tries to export this as
TINYINT
instead of
TINYINT UNSIGNED
. This gives you problems if you have values larger than 127 in the column.
• If you have very large (long) tables in Access, it might take a very long time to open them. Or you
might run low on virtual memory and eventually get an
ODBC Query Failed
error and the table
cannot open. To deal with this, select the following options:
• Return Matching Rows (2)
• Allow BIG Results (8).
These add up to a value of 10 (
OPTION=10
).
Some external articles and tips that may be useful when using Access, ODBC and Connector/ODBC:
• Read
How to Trap ODBC Login Error Messages in Access
• Optimizing Access ODBC Applications
•
Optimizing for Client/Server Performance
•
Tips for Converting Applications to Using ODBCDirect
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...