I got this from Witold Czarnecki:
SELECT NULL FROM sqlite_master WHERE tbl_name = 'your-table';
Regards,

Uriel_Carrasquilla


                                                                                
                                                       
                      "Richard Boyd"                                            
                                                       
                      <[EMAIL PROTECTED]        To:       
<[email protected]>                                                     
                      .com>                    cc:                              
                                                       
                                               Subject:  [sqlite] Best way to 
check for existence of a table?                          
                      02/13/2005 05:58                                          
                                                       
                      PM                                                        
                                                       
                      Please respond to                                         
                                                       
                      sqlite-users                                              
                                                       
                                                                                
                                                       
                                                                                
                                                       




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
differentiate between the error code meaning âno table foundâ and other
errors?? Or is there a neater way to check for existence of a table?





TIA,


Richard.No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10/02/2005





Reply via email to