How to list tables in an SQL database

Jan Schenkel janschenkel at yahoo.com
Mon Jan 19 11:52:17 EST 2004


--- Roger Kingston <roger.kingston at ntlworld.com>
wrote:
> All,
> 
> I've had a good deal of success using Rev 2's revdb
> functions, but would
> like to be able to get a list of tables belonging to
> a database that I
> have connected to.
> 
>   Looking in the code behind the Rev Database Query
> builder, there is a
> function:
> revTableNamesOfQuery() which looks promising, but it
> is not documented
> and I'm too dumb to figure out how to use it.
> 
> Any suggestions?
> 
> Roger Kingston
> 

Hi Roger,

The trick is to use the name of an existing query that
connects to the database whose table names you want ;
so suppose you have a query "Foobar" :
  put revTableNamesOfQuery("Foobar") into tNames
  answer tNames

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! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


More information about the use-livecode mailing list