I am currently having problems with my ADO connection string. I have searched all over the internet for a solution to this problem but I have yet to find a solution. Can someone help me with the proper configuration for a SQL OLEDB connection with a windows authentication? I have attached my C++ code file and a printscreen of my SQL Server Express signon screen.

The following is an error message I am receiving:

Error number: 80040e4d Login failed for user 'mcertini'.
Error
Code = 80040e4d
Code meaning = I
Source = Microsoft OLE DB Provider for SQL Server

MS-SQL server can operate in one of the two security modes:
1. Windows Authentication
2. Sql Server authentication

Read more on this subject - http://msdn.microsoft.com/en-us/library/aa905171(SQL.80).aspx

For Ms-SQL Express edition, use Windows Authentication,

pConnection1->ConnectionString = "Provider=SQLOLEDB;Data Source=.\\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=northwind";

adatapost,

Thank you for your response. I have made the changes you requested but continue to get an error message. Below is the error message:

Error number: 80004005 Cannot generate SSPI context
Error
Code = 80004005
Code meaning = U
Source = Microsoft OLE DB Provider for SQL Server

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.