By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

ODBC: SQLTables does not return data for an Access database?

P: n/a
(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
Dec 7 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Richard, I have no idea what 'SQLTables' might be. Judging from the lack of
response to your other post, it looks like I'm not alone. Perhaps you might
improve your chances of getting help if you explained that.

--
Brendan Reynolds

"Richard Marsden" <no*****@nospam.winwaed.com> wrote in message
news:pO********************@comcast.com...
(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

Dec 7 '05 #2

P: n/a
Pretty hard to comment without knowing what SQLTables does! How about
posting the code here?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Richard Marsden" <no*****@nospam.winwaed.com> wrote in message
news:pO********************@comcast.com...
(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

Dec 7 '05 #3

P: n/a
Sorry, SQLTables is an ODBC function call!
It is used to query some table information. eg. what tables are available.
I must have been using ODBC too much and assumed that saying "ODBC"
implied...
Richard

--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins
Dec 7 '05 #4

P: n/a
I don't have any personal experience with that, Richard, but here's a link
to Microsoft's documentation on support for the SQLTables function in the
Access ODBC driver ...

http://msdn.microsoft.com/library/de...ssqltables.asp

--
Brendan Reynolds

"Richard Marsden" <no*****@nospam.winwaed.com> wrote in message
news:hP******************************@comcast.com. ..
Sorry, SQLTables is an ODBC function call!
It is used to query some table information. eg. what tables are
available.
I must have been using ODBC too much and assumed that saying "ODBC"
implied...
Richard

--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins

Dec 7 '05 #5

P: n/a
Thanks for the link Brendan. I've bookmarked the next page up - it will
probably prove useful over the next few days!

Comparing what that page says to what I have in my book and the MS docs,
I tried a few options for the table types. Interestingly, the system
table option returns a list of tables, but none of the others do. Even
if I ask for all table types, I get an empty list!
I'm coding around it and marking it as "unsupported" for the
ODBC->Access combination, but this is less than ideal.
--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins
Dec 8 '05 #6

P: n/a
richard marsden
"Richard Marsden" <no*****@nospam.winwaed.com> wrote in message
news:mI********************@comcast.com...
Thanks for the link Brendan. I've bookmarked the next page up - it will
probably prove useful over the next few days!

Comparing what that page says to what I have in my book and the MS docs,
I tried a few options for the table types. Interestingly, the system
table option returns a list of tables, but none of the others do. Even
if I ask for all table types, I get an empty list!
I'm coding around it and marking it as "unsupported" for the
ODBC->Access combination, but this is less than ideal.
--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins

Jan 2 '06 #7

P: n/a
Richard Marsden <no*****@nospam.winwaed.com> wrote in
news:mI********************@comcast.com:
I'm coding around it and marking it as "unsupported" for the
ODBC->Access combination, but this is less than ideal.


Post A2K, is it not the case that MS deprecates ODBC in favor of
ADO, especially for Access->SQL Server?

Surely you could easily provide the functionality via ADO for the
ODBC drivers that don't support the SQLTables method.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 2 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.