How to connect to an SQL server using Windows authentication using qt?
Unsolved
General and Desktop
-
Hi, As of now i am using the below part of code to connect to SQL server. But I need to connect to SQL server using Windows authentication. Kindly help me out to connect SQL server using Windows authentication.
Here is the code, its working fine and able to connect the SQL server using SQL server Authentication:
dbase.setDatabaseName(QString("DRIVER={SQL Server};"
"Server=%1;"
"Database=%2;"
"Uid="+cipher.username()+"
"Pwd="+cipher.password()+")").arg(dbserver).arg(dbname));Thanks in advance!