Hi everybody... I know that this problem has been questioned many times here... but I did asearch but I couldn't quite get a hint over my problem... So here I am...
First of all the information:
- I'm usin ADO with Access over a Win2K machine...
- I only get the error once a run the EXE file (If I run the program in the IDE it works fine).
- I'm opening DB over the network.
- In the EXE file the error is generated only when I try to connect to a broken link (A computer that is not currently connected to the network), if the link is OK I get no error...
That's all I have for now... now lets see the code... The bolded line is where I get the error
VB Code:
Path1 = ComBTE(0).List(ComBTE(0).ListIndex) 'Get Path From combo box filled via OpenFile CommonDialog DataSpec.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" + Path1 + ";" MsgBox "A Punto De Abrir DB", vbInformation, "Error En Verificación de DB" [B]DataSpec.Open[/B] MsgBox "Cerifica Abrir DB", vbInformation, "Error En Verificación de DB"
Before that I have an OnError GoTo ErrSec, and after that I have:
VB Code:
ErrSec: MsgBox "Hubo Error", vbInformation, "Error En Verificación de DB" Select Case Err.Number ' Evaluate error number. Case -2147467259 ' "Time Out Connection" error. If RepComb.ListIndex = 0 Then FGRacklist.TextMatrix(UsedRows, 0) = ComBTE(0).List(Btecount) FGRacklist.TextMatrix(UsedRows, 1) = "No Se Pudo Conectar" ColFGRack UsedRows, 255, 0, 255, True UsedRows = UsedRows + 1 Else FGRacklist.TextMatrix(0, 0) = ComBTE(0).List(ComBTE(0).ListIndex) FGRacklist.TextMatrix(0, 1) = "No Se Pudo Conectar" ColFGRack 0, 255, 0, 255, True End If Case -2147217843 ' "Authentification Error" error. If RepComb.ListIndex = 0 Then FGRacklist.TextMatrix(UsedRows, 0) = ComBTE(0).List(Btecount) FGRacklist.TextMatrix(UsedRows, 1) = "Falló Autentificación" ColFGRack UsedRows, 255, 0, 255, True UsedRows = UsedRows + 1 Else FGRacklist.TextMatrix(0, 0) = ComBTE(0).List(ComBTE(0).ListIndex) FGRacklist.TextMatrix(0, 1) = "Falló Autentificación" ColFGRack 0, 255, 0, 255, True End If Case Is <> 0 MsgBox Err.Description + CStr(Err.Number), vbCritical, "Error" ' Handle other situations here... End Select
So just to make sure everything is explained... the msgbox are just to verify in which line the error is being generated. The Error Handling just tell me the reason why I couldn't open the DB... and as a said before in the IDE works perfecr... but as an EXE I got the error in the open after that it goes to ErrSec... and that's it...
Hope you can help me understand whats happening because I don't see any reason why this could be happening...
Tnx!


Reply With Quote
...
I'll try that... Just a simple question... where can I modify the connection timeout (In the connection string or is a property of the connection?)...
