Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSql Query over multiple database
Forum Update on Monday, May 27th 2025

QSql Query over multiple database

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 369 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ankit.Jain
    wrote on 30 Mar 2018, 08:41 last edited by
    #1

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

    Ankit

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 30 Mar 2018, 09:19 last edited by mrjj
      #2

      Hi
      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.

      1 Reply Last reply
      3

      1/2

      30 Mar 2018, 08:41

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved