MySQL ODBC は Windows95 と NT の 32ビット ODBC (2.50) level 0 ドライバです。我々は誰かがこれを Windows 3.x へ移植するのを希望します。
我々は Admndemo, いくつかの C プログラム, Msquery そして Excel でだけで ODBC をテストしました。
問題についてのいくつかの光を与えるために、われわれは ODBC マネージャから のログファイル (ODBCADMIN からのログの要求時に得られるログ) と MYODBC ロ グを望みます。
MYODBC ログを得るためには、MyODBC connect/configure screen 上で 'Options' 引数に 4 を足してください。
ログはファイル `c:\tmp\myodbc.log' に書かれます。
多くのプログラムが MyODBC で動作します。これらは我々自身がテストしたか、 または何人かの他のユーザから動作するという確証を得たものです:
SELECT concat(sunrise_time), concat(sunset_time) FROM sunrise_sunset;Values returned in this format (string) should be correctly recognised by Excel97 as time values. What
concat()
does in this case is that it fools ODBC to think
the column is of 'string type'. Without the 'concat()' ODBC knows the
column is of time type. Excel does not understand that.
Note that this is a bug in Excel because it automaticly converts a
string to a time. This would be great if the source was a text file, but
this is plain stupid when the source is a ODBC connection which reports
exact types for each column.
Windows95 上のサーバ名の記述には3つの可能性があります:
ip hostname
例えば:
194.216.84.21 my
'ODBC setup' を埋める方法の例。
Windows DNS name: test Description: This is my test database MySql Database: test Server: 194.216.84.21 User: monty Password: my_password Port:
The 'Windows DNS name' is any name that is unique in your windows ODBC setup.
When you fill in the values in the ODBC setup, these will be used as default values when prompting for a Driver connect. You don't have to give 'server', 'user' or 'password' in the ODBC setup screen.
ODBC ソースへの接続時に、server, user, password そして port を変更するた めのオプションを持ちます。
If port is not given the default port (3306) is used.
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.