Majordog Posted April 1, 2003 Posted April 1, 2003 (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 April 1, 2003 by Robby Quote
Moderators Robby Posted April 1, 2003 Moderators Posted April 1, 2003 try this... DatabaseKey = "Server=ERMDSQLSERVER;" _ & "Trusted_Connection=yes;" _ & "database=ERMD;" Quote Visit...Bassic Software
Majordog Posted April 1, 2003 Author Posted April 1, 2003 The change still generates the same error. Quote
Moderators Robby Posted April 1, 2003 Moderators Posted April 1, 2003 if ERMDSQLSERVER is a local server then try this instead 127.0.0.1 Quote Visit...Bassic Software
Majordog Posted April 1, 2003 Author Posted April 1, 2003 Hi Robby, The server is not local, but remote. It also has two named instances running on it. Quote
Moderators Robby Posted April 1, 2003 Moderators Posted April 1, 2003 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 Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.