Figure out what database i am connected to



  • 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


Log in to reply
 

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