Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hi All - I set my connection string:

DatabaseKey = "Data Source=ERMDSQLSERVER;" _

& "Integrated Security=SSPI;" _

& "Trusted_Connection=yes;" _

& "initial catalog=ERMD;"

 

When I try to open it with the following function:

Public Function get_TechnicianList(ByVal command As String) As SqlDataReader
           Dim sqldrTechnicianList As SqlDataReader
           Dim sqlConn As SqlConnection = New SqlConnection(DatabaseKey)
           Dim sqlCmd As SqlCommand = New SqlCommand(command, sqlConn)

           sqlCmd.Connection.Open()
           sqldrTechnicianList = sqlCmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
           Return sqldrTechnicianList
       End Function

I get error:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I have been looking ao-line for fixes and have confirmed/verifid that all my settings are set to windows NT authentication

Can anybody help me???

Edited by Robby
  • Moderators
Posted

Just grab a Connection from the data - toolbar, it allows you to test the connection.

 

or create a UDL file on your Desktop, right-click on your desktop > New > Text File > then rename the extension to .UDL

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...