Page 1 of 1
revDatabaseTableNames
Posted: Thu Jun 18, 2015 5:41 pm
by chipsm
I am using this code ("revDatabaseTableNames") to count the number of tables in my database. I am putting the results into a temporary field. This actually puts the list of table names into the temp variable.I then do a count of the records. I have verified the wrong count using a database tool "Navicat" to verify the table count.
I seem to have run into a limit in the number of table names that is returned. It is 194 and I know that there are over 1000 tables in this database.
Any words of wisdom will be highly appreciated.
Re: revDatabaseTableNames
Posted: Thu Jun 18, 2015 6:05 pm
by Klaus
Hi Clarence,
maybe this is a limitation of Livecode!?
Not being an SQL expert, but aren't there any SQL commands
that will return a list of tables "directly"? Know what I mean?
Best
Klaus
Re: revDatabaseTableNames
Posted: Thu Jun 18, 2015 6:12 pm
by chipsm
Klaus,
I am checking that out and will post a response once I have an answer.
Re: revDatabaseTableNames
Posted: Thu Jun 18, 2015 7:47 pm
by phaworth
Hi Clarence,
I'm assuming this is the same database as your post regarding spaces in table names?
A thousand tables in a single database is a huge number. Looking at the table name in your previous post, I'm curious about your database structure. The table name looked like it was more like data that belongs in a column than a table name. Maybe if you can explain a bit about the structure of your database, we might be able to come up with an alternative design that would work better for you.
As for SQL commands that return table names, yes there are such commands but they differ depending on what type of SQL you are using (SQLite,mySQL,etc).
Pete
Re: revDatabaseTableNames
Posted: Thu Jun 18, 2015 11:48 pm
by chipsm
The Tables are what I have been given and I have no control over them. I think it was done this way in order to make them proprietary and difficult for other people to use them. Hence, the spaces in the table names.