QSql Query over multiple database

  • Hi,
    I wish to run my query after selecting the database I wish to run it for. May I be suggested how?


  • Qt Champions 2017

    Do you mean over multiple databases from different database systems or do you mean
    one or more of say SQLite databases?
    Anyway, you can use

    fileName = QFileDialog::getOpenFileName(this, "Open DB", "/home/",     

    To simply point to db file and then u can open it and run the query.

    If all DB files are stored in same folder, you could also use
    QDir to enumerate all files and show in list and pick one from that.

    So many ways to "select db" but it really depends on what u had in mind.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.