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
QtWS25 Last Chance

QSql Query over multiple database

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 366 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 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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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

      • Login

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