0

I'm trying to test SQL Server (I've never used before), and I always get this annoying error:

enter image description here

I've traveled multiple websites, multiple questions, and do not get the solution. The user 'MrDan' is like the WINDOWS admin... I can't understand why can't connect.

Dim con As New MySqlConnection("Server=********;Database=PruebaMultiple;User Id=MrDan;Password=*****;")

Am I missing something? Or am I using a bad connection string?

1 Answer 1

3

First, connections to SQL Server are made using SqlConnection, not MySqlConnection. MySQL and SQL Server are different database systems. Second, explicit credentials work only for SQL accounts. You're trying to log in with a Windows user, and should therefore use Integrated Security=SSPI in your connection string (and omit user name and password). To sum up:

Dim con As New SqlConnection("Server=********;Database=PruebaMultiple;Integrated Security=SSPI")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.