Results 1 to 4 of 4

Thread: mysql connection sample

  1. #1
    Join Date
    Oct 2009
    Location
    chennai,india
    Posts
    66
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default mysql connection sample

    hi
    can any one give proper way or sample codes to connect mysql from qt.
    because my qt application will insert data frequently ,so whether for each time
    i need to open the database and insert then close the connection ???
    can i use same connection many times?? so pls i need an explanation if possible
    send samples!!
    thanks...

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

    Default Re: mysql connection sample

    take a look sqlbrowser demo which is located in QTDRI/demos/sqlbrowser.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Oct 2009
    Location
    chennai,india
    Posts
    66
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: mysql connection sample

    hi spirit
    thanks i ll look at it...

  4. #4
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql connection sample

    A while back we had a discussion about that.

    http://www.qtcentre.org/forum/f-qt-p...se--20037.html

    You may have to scroll down a bit.. I provided some code using a pointer to the db. That's still the way I'm doing it, even so the recommended way would be to use Qt's default connection stuff..

    HIH

    Joh

Similar Threads

  1. Regarding MYSQL connection
    By sudheer168 in forum Qt Programming
    Replies: 3
    Last Post: 16th October 2009, 15:34
  2. MySQL and shared-memory connection
    By patrikd in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2008, 16:53
  3. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  4. Replies: 3
    Last Post: 2nd August 2007, 21:28
  5. Qt and MySQL Database Connection
    By shamik in forum Qt Programming
    Replies: 41
    Last Post: 6th October 2006, 12:48

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.