So, thats an error from ADO?
Well, I changed my code and did this:
Private Function ComprobarConexion() As Boolean
Dim Cn As New ADODB.Connection, Rs As ADODB.Recordset
Dim a As Integer
Const JET_SCHEMA_USERROSTER As String =
"{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Trim(RutasSoftal.Db) & ";Persist Security Info=False"
a = Cn.State
Set Rs = Cn.OpenSchema(adSchemaProviderSpecific, , JET_SCHEMA_USERROSTER)
While Not Rs.EOF
a = a + 1
Rs.MoveNext
Wend
ComprobarConexion = a > 1
Rs.Close: Set Rs = Nothing
Cn.Close: Set Cn = Nothing
End Function
and It worked so well. Its not the best programming practice, but if works,
its ok.
Tnx for your help