Go to the first, previous, next, last section, table of contents.


ODBC

Which operating systems does MySQL ODBC support?

MySQL ODBC is a 32 bit ODBC (2.50) level 0 driver for Windows95 and NT. We hope somebody will port it to Windows 3.x.

How should I report problems with MySQL ODBC?

We have only tested ODBC with Admndemo, some C programs, Msquery and Excel.

To give some light about any problem we would like to have the log file from the ODBC manager (the log you get when requesting logs from ODBCADMIN) and a MYODBC log.

To get a MYODBC log, please put this MYSQL_DEBUG=d:t:O,filename in your `AUTOEXEC.BAT' and restart.

The log will be written to file `filename'.

Programs known to work with MyODBC.

Most programs should work with MyODBC, but these we tested ourselves or got a confirmation from some user that is works:

Program
Comment
Access
To make Access work:
Excel
Works. Some tips
odbcadmin
Test program for ODBC.
Delphi
One must use DBE 3.2 or newer.
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 recognise primary keys, only the index PRIMARY, though this has not been a problem.

How do I fill in the various fields in the ODBC administrator program?

There are three possibilities for specifying the server name on Windows95:

  1. Use the IP.
  2. Add a file lmhosts with the following info: ip hostname For example:
    194.216.84.21 my
    
  3. Configure the PC to use DNS.

Example of how to fill in the 'ODBC setup'.

Data Source Name:   test
Description:        This is my test database
Server:             194.216.84.21
User:               monty
Password:           my
Port:

These are default values to be given when prompting for a Driver connect. You don't have to give 'server', 'user' or 'password' in this screen. If port is not given the default port (3306) is used.

When connecting to an ODBC source you have the option to change the server, user, password and port.

How to get the value of a AUTO_INCREMENT column in ODBC

A common problem is how to get the value of an automatically-generated id from an INSERT. With ODBC you can do something like this:

INSERT INTO foo (auto,text) VALUES(NULL,'text')
select LAST_INSERT_ID()

or if you are just going to insert in into another table:

INSERT INTO foo (auto,text) VALUES(NULL,'text')
INSERT INTO foo2 (id,text) VALUES(LAST_INSERT_ID(),'text')


Go to the first, previous, next, last section, table of contents.


Casa de Bender