Re: [sqlite] [Delphi] Reading list of tables?
2009/8/27 Gilles Ganault : > BTW, I noticed that "sqlite_master" has two columns that return the > same thing: What is the difference between "name" and "tbl_name"? It's different for indexes, wiews and triggers. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [Delphi] Reading list of tables?
On Thu, 13 Aug 2009 09:10:11 -0500, Fred Williams wrote: >That's all you are suppose to get when querying the Master table for table >names. > >You ask how to get a list of tables. That is what you got. Thanks. I only needed to get the list of tables in an SQLite database file, and Simon's tip worked fine. BTW, I noticed that "sqlite_master" has two columns that return the same thing: What is the difference between "name" and "tbl_name"? Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [Delphi] Reading list of tables?
That's all you are suppose to get when querying the Master table for table names. You ask how to get a list of tables. That is what you got. What you are asking for now is more complex. Try: Select Name, SQL from "SQLite_master"; for even more fun try: Select * from "SQLite_master" Fred -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Gilles Ganault Sent: Thursday, August 13, 2009 3:28 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] [Delphi] Reading list of tables? On Tue, 11 Aug 2009 11:35:16 +0100, Simon Slavin wrote: >SELECT sql FROM sqlite_master WHERE type='table' Thanks Simon. To get only the name of the tables instead of the SQL command that was used to create them: SELECT tbl_name FROM sqlite_master WHERE type="table"'; ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [Delphi] Reading list of tables?
On Tue, 11 Aug 2009 11:35:16 +0100, Simon Slavin wrote: >SELECT sql FROM sqlite_master WHERE type='table' Thanks Simon. To get only the name of the tables instead of the SQL command that was used to create them: SELECT tbl_name FROM sqlite_master WHERE type="table"'; ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [Delphi] Reading list of tables?
On 11 Aug 2009, at 11:25am, Gilles Ganault wrote: > I'd like to fill a ComboBox widget with the list of tables in a > database file, using the free Aducom wrapper. > > Would someone have some code handy on how to extract this information > from a SQLite database, ie. the equivalent for the CLI command > ".tables". SELECT sql FROM sqlite_master WHERE type='table' Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] [Delphi] Reading list of tables?
Hello I'd like to fill a ComboBox widget with the list of tables in a database file, using the free Aducom wrapper. Would someone have some code handy on how to extract this information from a SQLite database, ie. the equivalent for the CLI command ".tables". Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users