Results 1 to 7 of 7

Thread: QSqlQuery::bindValue problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    132
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 16 Times in 16 Posts

    Default Re: QSqlQuery::bindValue problem

    Im not sure if this ought to work, since I always use value() method to get the selected columns.

    If it shoud work at all, it might have to be bound as "out" or inout variable, the default is however QSql::in

    In case your intention is to dynamically change column names of the query, maybe this is a solution:

    query.prepare(QString("select %1 from mytable").arg("foo"));
    Last edited by seneca; 10th March 2009 at 16:32.

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

    segfault (10th March 2009)

Similar Threads

  1. Compilation problem with QSqlQuery::bindValue()
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 18th November 2013, 23:30
  2. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 13:48
  3. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 10:12
  4. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 09:47
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

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.