Need help with SQL Connection string
This is driving me crazy guys, I'm hoping someone here can help me out.
I need to connect to a MSSQL database to pull some data off in my C# WinForms app. I've done this millions of times, shouldn't be a big deal.
For some reason, I'm getting a "login failed" error -- and it doesn't matter what user ID I use. I've done the normal read-only account, my Windows account (I have sysadmin perms on the server, as the DBA), even freaking SA -- and still "login failed".
Just as a sanity check, I logged into Management Studio with the read-only account and confirmed that the password was correct and I could read the appropriate DB. For some reason, my code just won't let me connect.
Redacted connection string:
SqlConnection srcConn = new SqlConnection("Server=<IP OF SERVER>;Database=<DBName>;Integrated Security=true;");
The error gets thrown on the `srcConn.Open();` statement. What on earth am I doing wrong?
0 comments:
Post a Comment