(also posted to microsoft.public.access.odbcclientsvr but no reply so
far: problem concerns ODBC->MS Access)
I have some ODBC code that I'm testing against various underlying
databases. The code was developed against MySQL but now I'm getting
other common options to work. I'm having trouble with Access - even the
sample code (intended for Access) is giving some odd results...
My setup: Windows 2000 running Access 2000. Using ODBC to read the local
Access db.
I'm using SQLTables to find out if a table exists, and how many tables
are in the database.
But when I call SQLTables I get an "ok". The bind for the column holding
the table name is "ok" and then the first SQLFetch SQL_NO_DATA - ie. no
rows. The code works with a local MySQL database. I've copied sample
code from "ODBC 3.5 Developer's Guide" (Roger E. Sanders) - same result.
I've just tried the relevant sample program in this book. This uses the
Access Northwind sample database. No change to the code, created the
User DSN as per the book's instructions. Same result - each call to
SQLTables returns zero rows of information. But presumably it worked for
Mr. Sanders? Also I'm using a more uptodate version of
Access,Windows/etc that he uses (NT4 and Access 97 iirc).
Has anyone else come across this problem? Anything to look for? It
looks like it worked at one time?
Also a lot of the parameters for SQLGetStmtAttr appear to return
"unsupported" but I have reached the point where I can make a legitimate
test of that, yet...
--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins