'Vb.Net The Difference Between SQlConnection Strings
Hello guys i have simple Question about what is the difference between these SQlConnection Strings
1.
Dim Con As New SqlConnection("Server = Z\SQL; Database = Project; id = zzz; pwd = zzz integrated Security = true")
Dim Con As New SqlConnection("Driver = {SQL SERVER}; Server = Z\SQL; Database = Project; id = zzz; pwd = zzz integrated Security = true")
Dim Con As New SqlConnection("@Server = Z\SQL; Database = Project; id = zzz; pwd = zzz integrated Security = true")
Also Which is the most optimal procedure?
Thanks before
Solution 1:[1]
the 1 and 2 Code are the same, and if you don't want to access your SQL by Windows Aunthetication then set the Integrated Security to False and then add UID (Sql Login Id) & PWD (Password) into the string.
thanks anyone.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MD H |
