Sunday, February 12, 2012

Cant connect to db via code, but can from SQL Server.

Having an issue where I can connect to a remote SQL Database server via enterprise manager, however using the exact same db credentials, I can't connect via the .NET SqlConnection object...

Anyone have this error? Did you ever figure it out?

The error I get is: "SQL Server does not exist or access denied."

Again... I'm using the EXACT same user name, password, port number. I've setup an alias in Client Network Utility...

The SQL Server Enterprise is running on the exact same PC as the code I'm trying to execute.

Thanks for any help!Are you using Integrated Security, what does your connection string look like?|||*UGH*...

I hate it when I waste time on such a trivial error. ;)

It was a stupid mistake. In C, C#, C++, you have to escape the escape char. I had forgotten to do that in my con str.

No comments:

Post a Comment