Hi,
Using VB6 and ADO 2.7 to connect to a SQL Server 2008 R2 system. Occasionally, we are presented with a SQL account lockout issue. Example code below:
Code:
Private Sub Connect()
On Error GoTo err_Connect
Dim oConn As New ADODB.Connection
Dim sConn As String
sConn = "Valid Connection String"
oConn.Open sConn
exit_Connect:
Exit Sub
err_Connect:
MsgBox Err.Number & ": " & Err.Description
Resume exit_Connect
End Sub
Using the above approach however masks the real error and instead presents it as a generic 'Invalid connection string attribute' error. How would I go about finding/presenting the base error from SQL?
Any assistance is (as always) greatly appreciated!
Best Regards
Brad