MySQL 4.x, MyODBC 3.51.x, and SQLTables
am 07.12.2004 04:06:41 von Bill Schwab
Hello,
I am having a problem that _appears_ to be caused by SQLTables()
returning an empty (null terminated) string for a TABLE_CAT value, but
indicating a length of 9 for the field. I am basing this on debugging
in Dolphin Smalltalk (http://www.object-arts.com), and considerable
guesswork. In short, I am hoping that if the theory is correct, it will
resonate with somebody. Apologies if this is a wild goose chase.
Bill
Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254
Email: bills@anest4.anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: MySQL 4.x, MyODBC 3.51.x, and SQLTables
am 07.12.2004 18:49:57 von Jan Theodore Galkowski
PHP's odbc_tables() for PHP 4.3.9, MySQL 4.1, MySQL ODBC 3.51=20
driver running on Win32 5.1.2600 SP2 under OmniHTTPd/3.0a3 and
$mydb =3D odbc_connect( 'XPER001', '--user--', '--pass--' ) ;=20
odbc_result_all( odbc_tables( $mydb ), 'border=3D"1"' ) ;=20
results in:
+---------+-----------+--------------+----------+----------- +
|TABLE_CAT|TABLE_SCHEM|..TABLE_NAME..|TABLE_TYPE|..REMARKS.. |
+---------+-----------+--------------+----------+----------- +
|.........|...........|integertable..|..TABLE...|MySQL table|
+---------+-----------+--------------+----------+----------- +
|.........|...........|samplesettable|..TABLE...|MySQL table|
+---------+-----------+--------------+----------+----------- +
|.........|...........|stringtable...|..TABLE...|MySQL table|
+---------+-----------+--------------+----------+----------- +
for a three table database, with dots standing in for blanks.
In other words, TABLE_CAT and TABLE_SCHEM are null.
According to this source
http://zugeschaut-und-mitgebaut.de/php/function.odbc_tables. html
odbc_tables calls SQLTable().
I have found the ODBC interface to MySQL using some drivers to be=20
unpredictable and sometimes unreliable, at least when used from PHP.
See, for instance, the Comments posted on the documentation for=20
odbc_tables() at
http://us2.php.net/manual/en/function.odbc-tables.php
I have found some similar oddities when using ODBC against=20
Pervasive.SQL. This has convinced me to "go native" whenever=20
possible.
Hope this helps.
-- jtg
On Mon, 06 Dec 2004 22:06:41 -0500, "Bill Schwab"
said:
> Hello,
>=20
> I am having a problem that _appears_ to be caused by SQLTables()
> returning an empty (null terminated) string for a TABLE_CAT value, but
> indicating a length of 9 for the field. I am basing this on debugging
> in Dolphin Smalltalk (http://www.object-arts.com), and considerable
> guesswork. In short, I am hoping that if the theory is correct, it will
> resonate with somebody. Apologies if this is a wild goose chase.
[snip]
--=20
Jan Theodore Galkowski (o°) =
jtgalkowski@alum.mit.edu
http://www.smalltalkidiom.net
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: MySQL 4.x, MyODBC 3.51.x, and SQLTables
am 08.12.2004 01:37:14 von Bill Schwab
Jan,
Nice to hear from you again! c.l.s.d is still there when you're ready
:)
Thanks for the information. I have a Dolphin workaround that enables
my code to run, but I would rather not need it. I might try to compile
the ODBC driver with a few OutputDebugString() calls to test my theory
about the empty string and length=9. Of course, it is possible that the
problem occurs further up in the ODBC world, which might make it much
harder to find.
However,, I **think** (will check again later) that selecting the No
Catalog option on the data source fixed the problem. This is with
4.0.20 (suddenly looking forward to trying 4.1x again) and a very
recent if not latest MyODBC. I note that this version of MyODBC has
debug options enabled; perhaps they might show a difference with and w/o
catalogs.
Ring any bells?
Thanks!!
Bill
Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254
Email: bills@anest4.anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org