Jump to content

DB connection error


maelstorm
 Share

Recommended Posts

Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;"Dim MyConn As New SqlConnection(str)MyConn.Open()When I open in the local host, I am getting the following error. guessing it as some IIS problem, but cant figure out....ERROR:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Link to comment
Share on other sites

Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;"Dim MyConn As New SqlConnection(str)MyConn.Open()When I open in the local host, I am getting the following error. guessing it as some IIS problem, but cant figure out....ERROR:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;username=username;password=password"Did you include username and password?Specify username and password for the above database and it should work fine.. You need to create username and password for the database for accessing data.
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...