Results 1 to 4 of 4

Thread: Mysql unknown database, QMYSQL unable to connect

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Location
    Salatiga, Indonesia
    Posts
    160
    Thanks
    11
    Thanked 32 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Mysql unknown database, QMYSQL unable to connect

    If you use QMYSQL driver,
    Qt Code:
    1. db.setDatabaseName("db_name");
    To copy to clipboard, switch view to plain text mode 
    means open existing database.

    You can create database using QSqlQuery.
    Qt Code:
    1. QSqlQuery query("CREATE DATABASE db_name");
    To copy to clipboard, switch view to plain text mode 

  2. The following 3 users say thank you to saa7_go for this useful post:

    lixo1 (14th July 2010)

  3. #2
    Join Date
    Sep 2008
    Posts
    60
    Thanks
    20
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mysql unknown database, QMYSQL unable to connect

    Thank you very much!

  4. The following 2 users say thank you to lixo1 for this useful post:


Similar Threads

  1. how to reconnect CORRECTLY qmysql database?
    By yaseminyilmaz in forum Newbie
    Replies: 7
    Last Post: 12th January 2010, 13:09
  2. how to reconnect CORRECTLY qmysql database?
    By yaseminyilmaz in forum Qt Programming
    Replies: 0
    Last Post: 31st December 2009, 12:20
  3. QT 4.5 QMYSQL and Mysql 4.1 servers does not work
    By elektritter in forum Qt Programming
    Replies: 1
    Last Post: 21st July 2009, 15:53
  4. ODBC Oracle. Unable to connect to database
    By egil in forum Qt Programming
    Replies: 2
    Last Post: 17th October 2008, 13:46
  5. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 17:50

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.