Results 1 to 9 of 9

Thread: Class to connect and make a query on a database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Location
    Rio de Janeiro - Brazil
    Posts
    19
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Class to connect and make a query on a database

    I've tryed to build QPSQL driver, but... I'm using MinGW.
    Following the QT Wiki documentation, I downloaded all of MinGW-Tools package and there is no reimp tool inside!
    I found a link to reimp tool made by Anders Norlander, but his site is off.
    After some searchs, I found another guy called Jose Fonseca and I got the reimp tool, but only sources files that I couldn't build.

    Maybe there is another way to build or download QPSQL driver?

    Somebody has the driver and can put available to download?

    Thanks.

  2. #2
    Join Date
    Oct 2009
    Location
    Rio de Janeiro - Brazil
    Posts
    19
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Class to connect and make a query on a database

    Finnaly after 8 hours trying to build this driver, it's done!
    On Windows 7 it is impossible! Only it's works on XP.
    I build on XP and copy to Win 7.

    Can I share this .dll with another people?

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Class to connect and make a query on a database

    Quote Originally Posted by junix View Post
    Can I share this .dll with another people?
    I don't know. Try if it works. E.g. set up a virtual box or simply try it on an other computer.
    As for the database question. Of course you then shouldn't close it. see QSqlDatabase::addDatabase() and it second parameter! and for the query simply use
    Qt Code:
    1. QSqlQuery q(QSqlDatabase::database("YourConnectionName"));
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Oct 2009
    Location
    Rio de Janeiro - Brazil
    Posts
    19
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Class to connect and make a query on a database

    Yes, it works!
    I build on XP and copy to Windows 7 and both of them is working.
    I'd like to share this dll's, if somebody knows if is possible, please, tell me.

    Thanks.

Similar Threads

  1. QSqlDatabase - How to connect to multiple database?
    By cutie.monkey in forum Qt Programming
    Replies: 4
    Last Post: 10th March 2010, 12:03
  2. How to realize multi-threaded database query?
    By bangqianchen in forum Qt Programming
    Replies: 2
    Last Post: 14th November 2008, 07:15
  3. Replies: 12
    Last Post: 18th September 2008, 15:04
  4. [QT4][SQLITE] Database and query
    By agent007se in forum Newbie
    Replies: 10
    Last Post: 12th July 2006, 22:16
  5. My application can't connect to database when deploy it???
    By gtthang in forum Installation and Deployment
    Replies: 1
    Last Post: 15th February 2006, 11:01

Tags for this Thread

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.