How do I iterate through the list of table names in a database?
I'd like to create a generic database display, and I want to get the table names (using revDatabaseTableNames), and generate a list to iterate through.
Thanks!
Diane
how to iterate through tables in a database
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: how to iterate through tables in a database
revDatabaseTableNames returns a list of tables, one per line, so after executing that command you should be ready for something like
repeat for each line linTableName in tTableNames
do something with linTableName
end repeat
EDIT: for typo.
repeat for each line linTableName in tTableNames
do something with linTableName
end repeat
EDIT: for typo.
Last edited by dglass on Mon Jun 13, 2011 3:03 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: how to iterate through tables in a database
Typo, I expect.
repeat for each linTableName in tTableNames
is likely, repeat for each line TableName in tTableNames
repeat for each linTableName in tTableNames
is likely, repeat for each line TableName in tTableNames
Re: how to iterate through tables in a database
Yep. Oops.dunbarx wrote:Typo, I expect.
Re: how to iterate through tables in a database
Thanks guys, it did the trick and it's working!