when trying to connect
def dbcon():
db = QtSql.QSqlDatabase.addDatabase('QODBC3')
db.setHostName('xxx')
db.setDatabaseName('xxx')
db.setUserName("xxx")
db.setPassword('xxxx')
ok = db.open()
if not ok: print(db.lastError().text())
# else: print("connected")
query = QSqlQuery(db)
query.exec_('SELECT * FROM IMSS')
if __name__ == '__main__':
app = QApplication(sys.argv)
dbcon()
keep getting output:
Error: (IM002) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified QODBC3: Unable to connect
I searched for this driver and is not in my odbc driver manager, not sure how to add a data source to this driver