On Error GoTo error
'CNSQL1.CursorLocation = adUseClient
'Set CNSQL1 = New ADODB.Connection
CNSQL1.Open "Provider = SQLOLEDB.1; Password = sal21; Persist Security Info = True; User ID = sa; Initial Catalog = DB_ *****; Data Source = xxxxx \ SQLEXPRESS"
Exit Sub 'exit from the application,
'benefit would be the next code
MsgBox "Error number:" & CStr (Err.Number) 'is used to convert CStr
'in a string
MsgBox "Description:" & Err.Description
MsgBox "source of error:" & Err.Source
that if I run the query via Mangement Sql Server Express installed where the application for risiedee sql express has a lightningr, but if I run away Mangement Sql Server Express installed on another computer (always using the same instance and db) the query is very very slow!!!!!!!!!!!!!