How to list tables in an SQL database

Jan Schenkel janschenkel at yahoo.com
Tue Jan 27 05:01:48 EST 2004


--- Roger Kingston <roger.kingston at ntlworld.com>
wrote:
> Thanks again Jan, I very much appreciate your
> in-depth knowledge of the
> secrets of Rev!
> 
> My tests, which I performed on ODBC connections both
> local (MS Access)
> and over the Internet (MS SQL), show that the
> revdb_tablenames()
> function does exist (i.e. no error message when
> called), but the
> response is always empty.  This is strange, because
> I can manipulate the
> connected databases very successfully with all the
> other revdb funtions
> and commands, so I'm not sure what is going wrong
> here.  I tried the
> exact example you mailed me and the response was
> empty.  Perhaps this is
> why the function isn't documented, maybe it's not
> properly supported?
> 
> The only other clue I have is that when using the
> Automatic DB Query
> form, it too fails to list the database tables. 
> Could it be connected
> with something in my local setup or do others
> experience the same
> problem?
> 
> Regards
> 
> Roger Kingston
> 

Hi Roger,

It is strange indeed that you can get access to the
data inside, but niot see a list of the tables ;
perhaps this is one of the grey areas in ODBC, that
may or may not work for a database.

Perhaps you can send a specific SQL query yourself, to
fetch this information ? You'll have to look it up in
the manual of the database, but for MySQL you can do :
  SHOW tables
And in Oracle, you can use :
  SELECT * FROM tab

If you happoen to find one that works, don't hesitate
to post it to the list :-)

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


More information about the use-livecode mailing list