Hello evreyone,
Can anybody please let me know which connection string to be used for MS SQl server database connection for a Windows Desktop Application with MFC?
I am doing this project in Visual Studio 2019, where i have connected to the database for the project. With Tools-> Connect to DataBase-> Provider (MS SQL Server), W10SQLEXPRESS(local server). Also I can see my tables created in the SQL Server explorer in Visual Studio.
What I have tried:
I have tried to open a connection with the SQL server, but results in failure. If anyone body have done a similar Project, Could you please let me know the connection string for opening a connection with SQL server?
My data source is Microsoft SQL Servver
_bstr_t StrConnection = "Provider=sqloledb;Data Source=W10SQLEXPRESS;"
"Initial Catalog=Employee;"
"Integrated Security=SSPI;"
Also I am using Windows Nt Authentication and also wanted to connect the server locally
If anybody has an idea , please reply. It would be a great help for me to move further with the Project.
Thanks in advance.