Connection Problem - Newbie Ques

Majordog

New member
Joined
Apr 1, 2003
Messages
3
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:
Code:
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???
 
Last edited by a moderator:
try this...

DatabaseKey = "Server=ERMDSQLSERVER;" _
& "Trusted_Connection=yes;" _
& "database=ERMD;"
 
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
 
Back
Top