|
Most programs should work with MyODBC, but for each of those
listed below, we have tested it
ourselves or gotten confirmation from some user that it works:
- Program
-
Comment
- Access
-
To make Access work:
-
You should have a primary key in the table.
-
You should have a timestamp in all tables you want to be able to update.
-
Only use double float fields. Access fails when comparing with single floats.
-
Set the `Return matching rows' option field when connecting to MySQL.
-
Access on NT will report
BLOB columns as OLE OBJECTS . If
you want to have MEMO columns instead, you should change the
column to TEXT with ALTER TABLE .
-
Access can't always handle
DATE columns properly. If you have a problem
with these, change the columns to DATETIME .
-
In some cases, Access may generate illegal SQL queries that
MySQL can't understand. You can fix this by selecting
"Query|SQLSpecific|Pass-Through" from the Access menu.
- DataJunction
-
You have to change it to output
VARCHAR rather than ENUM , as
it exports the latter in a manner that causes MySQL grief.
- Excel
-
Works. Some tips:
- odbcadmin
-
Test program for ODBC.
- Delphi
-
You must use DBE 3.2 or newer. Set the `Don't optimize column width'
option field when connecting to MySQL.
Also, here is some potentially useful delphi code that sets up both an
ODBC entry and a BDE entry for MyODBC (the BDE entry requires a BDE
Alias Editor which may be had for free at a Delphi Super Page near
you.): (Thanks to Bryan Brunton bryan@flesherfab.com for this)
fReg:= TRegistry.Create;
fReg.OpenKey('\Software\ODBC\ODBC.INI\DocumentsFab', True);
fReg.WriteString('Database', 'Documents');
fReg.WriteString('Description', ' ');
fReg.WriteString('Driver', 'C:\WINNT\System32\myodbc.dll');
fReg.WriteString('Flag', '1');
fReg.WriteString('Password', '');
fReg.WriteString('Port', ' ');
fReg.WriteString('Server', 'xmark');
fReg.WriteString('User', 'winuser');
fReg.OpenKey('\Software\ODBC\ODBC.INI\ODBC Data Sources', True);
fReg.WriteString('DocumentsFab', 'MySQL');
fReg.CloseKey;
fReg.Free;
Memo1.Lines.Add('DATABASE NAME=');
Memo1.Lines.Add('USER NAME=');
Memo1.Lines.Add('ODBC DSN=DocumentsFab');
Memo1.Lines.Add('OPEN MODE=READ/WRITE');
Memo1.Lines.Add('BATCH COUNT=200');
Memo1.Lines.Add('LANGDRIVER=');
Memo1.Lines.Add('MAX ROWS=-1');
Memo1.Lines.Add('SCHEMA CACHE DIR=');
Memo1.Lines.Add('SCHEMA CACHE SIZE=8');
Memo1.Lines.Add('SCHEMA CACHE TIME=-1');
Memo1.Lines.Add('SQLPASSTHRU MODE=SHARED AUTOCOMMIT');
Memo1.Lines.Add('SQLQRYMODE=');
Memo1.Lines.Add('ENABLE SCHEMA CACHE=FALSE');
Memo1.Lines.Add('ENABLE BCD=FALSE');
Memo1.Lines.Add('ROWSET SIZE=20');
Memo1.Lines.Add('BLOBS TO CACHE=64');
Memo1.Lines.Add('BLOB SIZE=32');
AliasEditor.Add('DocumentsFab','MySQL',Memo1.Lines);
- C++Builder
-
Tested with BDE 3.0. The only known problem is that when the table
schema changes, query fields are not updated. BDE however does not seem
to recognize primary keys, only the index PRIMARY, though this has not
been a problem.
- Visual basic
-
To be able to update a table, you must define a primary key for the table.
|