Results 1 to 2 of 2

Thread: Dose the QSQLITE support the QUERY COMMAND LINE ?

  1. #1
    Join Date
    Jan 2011
    Posts
    40
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Dose the QSQLITE support the QUERY COMMAND LINE ?

    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 ?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Dose the QSQLITE support the QUERY COMMAND LINE ?

    Sqlite supports valid SQL. 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.

Similar Threads

  1. How to find result of a query in qsqlite?
    By newtowindows in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2009, 11:40
  2. QProcess and the command line
    By auba in forum Qt Programming
    Replies: 17
    Last Post: 27th May 2009, 10:39
  3. Error executing SELECT query with QSQLITE
    By garfield85 in forum Qt Programming
    Replies: 6
    Last Post: 25th May 2009, 18:05
  4. Printing to Command Line
    By seanmu13 in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2007, 15:57
  5. Is there a command-line window in Qt4?
    By miaoliang in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2006, 08:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.