Results 1 to 20 of 20

Thread: query prepare with sql math

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: query prepare with sql math

    I can't download testemysql2.cpp

  2. #2
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Re: query prepare with sql math

    I have uploaded it again.

    Renan

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: query prepare with sql math

    looks like bug in Qt.
    this code works, you can use it
    Qt Code:
    1. ...
    2. query.prepare(QString("select %1/%2").arg(ui.lineEdit->text()).arg(ui.lineEdit_2->text()));
    3. ...
    To copy to clipboard, switch view to plain text mode 

  4. The following user says thank you to spirit for this useful post:

    GuL (2nd September 2008)

  5. #4
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Re: query prepare with sql math

    Thanks again spirit.

    I will wait one or two days to report these to trolltech. Maybe someone knows why this is happening.

    I'm using QT 4.3.4 open source Linux Ubuntu 8.04. I don't if this happens with QT 4.4.1.

    Renan

  6. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: query prepare with sql math

    I've tested on Qt 4.4.1, the result is the same.

Similar Threads

  1. QTableWidget Sql Query 25.000 records
    By aekilic in forum Qt Programming
    Replies: 2
    Last Post: 12th August 2008, 14:54
  2. Sql Query Problem
    By MrShahi in forum Qt Programming
    Replies: 6
    Last Post: 30th May 2008, 09:16
  3. QTreeView with results from an SQL query.
    By ederbs in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2007, 02:41

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.