PDA

View Full Version : Dose the QSQLITE support the QUERY COMMAND LINE ?



wter27
1st February 2011, 01:58
When I use the command line "select * from 01005;"
the qDebug() came the error :QSqlError(1, "Unable to execute statement", "near "01005": syntax error") ;

And if I changed the 01005 to the t01005,it comes no error .So I want to know if the database support the int variables or not ?

ChrisW67
1st February 2011, 02:07
Sqlite supports valid SQL. (http://www.sqlite.org/lang.html) Your first example is not valid SQL (table names must start with an alphabetic character or an underscrore), hence the error message. Your second example generates no error if a table by the name "t01005" exists.

Sqlite supports 64-bit integer values in columns.