Re: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Greg Miller
Richard Boyd wrote: I tried what you suggested and I always get the error message: "SQL error: no such column: table32" Whether the table exists or not, I always get returned value of 1 from sqlite3_exec(). The exact command that I use is: SELECT count(*) FROM sqlite_master WHERE name=table32 AND

RE: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Mr. Tezozomoc
Try something like . dba_int_t dba_check_table_exist (dba_void_t *hndArg, dba_char_t *table) { /**/ /* Local Variables: */

RE: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Uriel_Carrasquilla
did you try: SELECT NULL FROM sqlite_master WHERE tbl_name = 'table'; Regards, [EMAIL PROTECTED] NCCI Boca Raton, Florida 561.893.2415 greetings / avec mes meilleures salutations / Cordialmente mit freundlichen GrÃÃen / Med vÃnlig hÃlsning

Re: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Ulrik Petersen
Hi Richard, Richard Boyd wrote: Thanks for the prompt reply... I tried what you suggested and I always get the error message: "SQL error: no such column: table32" Whether the table exists or not, I always get returned value of 1 from sqlite3_exec(). The exact command that I use is: SELECT count(*)

RE: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Richard Boyd
Thanks for the prompt reply... I tried what you suggested and I always get the error message: "SQL error: no such column: table32" Whether the table exists or not, I always get returned value of 1 from sqlite3_exec(). The exact command that I use is: SELECT count(*) FROM sqlite_master WHERE

Re: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Uriel_Carrasquilla
I got this from Witold Czarnecki: SELECT NULL FROM sqlite_master WHERE tbl_name = 'your-table'; Regards, Uriel_Carrasquilla "Richard Boyd" <[EMAIL PROTECTED]To: .com>

Re: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Uriel_Carrasquilla
I got this from Witold Czarnecki: SELECT NULL FROM sqlite_master WHERE tbl_name = 'your-table'; Regards, Uriel_Carrasquilla "Richard

[sqlite] Best way to check for existence of a table?

2005-02-13 Thread Richard Boyd
Hi,   I need a way to check if a table exists from some C code. I wrote some code to try to select a row from a table and then checked the error result. However, the error code is always ‘1’ (which is just a general SQLITE_ERROR) if the table does not exist. Is there any way I can