-
ADO Connection String.
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.
-
Connection Error Code.
Attached is the error code I am getting.
-
I looked at the error message just to see what kind of error message could possibly require 164K. I was very disappointed -- you could have (should have) just posted that, I'm thinking.
Anyway, certainly no DB guru, never used ADO, so take with a very large mountain of salt, but: looking through the MSDN pages about logins (since that's the error you're getting, invalid username/password) suggests that Persist Security Info=true doesn't allow you to not give your password the first time, but merely allows you to get the username and password from the connection after a connection has been established.
-
tabstop,
After uploading the error code I found a more efficient way of doing this. In other posting I just copied my console message into the board. To respond to your message, I changed my Persist Security Info. but I continue to get an error message. The following is my error message after making this change:
Error number: 80004005 Invalid authorization specification
Error
Code = 80004005
Code meaning = U
Source = Microsoft OLE DB Provider for SQL Server
-
Not sure why you're only getting one letter out of your "code meaning", but you can look up 80004005 on MSDN to find out that is "User: Reason: Not defined as a valid user of a trusted SQL Server connection." which we already figured anyway. I have no idea how you're authentication is set up so I don't know much here.
(If you get desperate: I noticed that all the examples I could find lacked quotes like you have, so instead of username='username' they had username=username. I have no idea if OLE cares, but I don't have much else.)
-
tabstop,
Thank you. I will look this up in MSDN.