#24 Table names should have single quotes

closed-invalid
nobody
None
5
2010-11-13
2007-03-26
shwango
No

If you have a table name with a dash in it, then SQLite Database Browser errors out (in the log) but the UI displays nothing. Adding single quotes around the table name in the SQL statements fixes the problem.

Example:
statement = "PRAGMA TABLE_INFO('";
statement.append( (const char *) it.data().getname().latin1());

statement.append("');");

Discussion

  • Nobody/Anonymous

    Use ` (back tick) to denote the table name, and can also be used to denote a column name when the name is a SQL function name/syntax. SQL base structure syntax.

     
  • Peter "mash" Morgan

    • status: open --> closed-invalid
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks