Results 1 to 15 of 15

Thread: Using bound values in insert gives "parameter count mismatch" error in SQLite

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Join Date
    Dec 2010
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Using bound values in insert gives "parameter count mismatch" error in SQLite

    I had a similar problem leading to "parameter count mismatch" error.
    I was trying to bind the table name like:
    Qt Code:
    1. q.prepare("SELECT * FROM :table");
    2. q.bind(":table", "myTable");
    3. q.exec();
    To copy to clipboard, switch view to plain text mode 

    This is not possible, one can only bind filed values.
    Could be useful for future readers.

  2. The following user says thank you to remy_david for this useful post:

    curtwagner1984 (13th May 2017)

Similar Threads

  1. Parameter count mismatch in create table statement
    By croscato in forum Qt Programming
    Replies: 5
    Last Post: 4th February 2011, 09:38
  2. Replies: 1
    Last Post: 7th April 2010, 21:46
  3. Replies: 3
    Last Post: 25th August 2009, 13:03
  4. "Treat wchar_t as Built-in Type" to "yes" link error
    By sungaoyong in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2008, 11:45
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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
  •  
Qt is a trademark of The Qt Company.