Hi all,
How can I capture SQL Server Errors and validate sql server credentials?
I've got the following code on a Login button:
VB Code:
Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click If (RdoSQLAuth.Checked = True) Then JMSGlobals.JMSConnection.ConnectionString = "Server=" & Me.txtJMSServer.Text & ";Database=MSTRIBOLOGY;User ID=" & Me.txtUsername.Text & ";Password=" & Me.txtPassword.Text & ";Trusted_Connection=False;workstation id=" & Environment.MachineName & "" Me.DialogResult = DialogResult.OK 'Me.Close() ElseIf (RdoNTAuth.Checked = True) Then JMSGlobals.JMSConnection.ConnectionString = "Data Source=" & Me.txtJMSServer.Text & ";Initial Catalog=MSTRIBOLOGY;Integrated Security=SSPI;workstation id=" & Environment.MachineName & "" Me.DialogResult = DialogResult.OK 'Me.Close() End If End Sub
Any Help will be app...
Thanks Rudi


Reply With Quote