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. Figure out what database i am connected to
Forum Updated to NodeBB v4.3 + New Features

Figure out what database i am connected to

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.3k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    Prosit
    wrote on last edited by
    #1

    So i'm writing a database manager to handle multiple MySQL and MSSQL servers. I have no problem connecting to these and do some small things lie show tables, columns, edit rows and delete rows.
    But i am in need of determening what database i am connected to now so i can add rows. I have tried to use the qTableView built in function of adding a row but it does not take into consideration of columns with the "auto_increment" flag or the "primary key" flag so i want to write just a query to add a row. These need to be different between MSSQL and MySQL.
    I use QODBC with a system DSN to connect.
    Can i somehow figure this out or do i need to make a flag in the part of the program that reads in the servers?

    Thanks

    1 Reply Last reply
    0

    • Login

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