Hola!
Come intercetto un errore di run-time?
La msgbox di errore chemi ginera il sistema è la seguente:
-2147217833(80040e57)
ORA-01401
Hola!
Come intercetto un errore di run-time?
La msgbox di errore chemi ginera il sistema è la seguente:
-2147217833(80040e57)
ORA-01401
Ciao.
Innanzitutto ho trovato la descrizione al tuo errore su MSDN - Library:
0x80040E57 -2147217833 A literal value in the command overflowed the range of the type of the associated column.
In ogni caso, un modo per intercettare gli errori in VB6 è il seguente:
Private Sub Command1_Click()
On Error GoTo int_Err 'Dichiaro che al verificarsi di un errore deve eseguire il codice che segue la label int_Err
Dim i As Integer
i = 300 / 0 'Genero un errore di Divisione per 0
Exit Sub
int_Err:
MsgBox "Errore n." & Err.Number & vbCrLf & "Descrizione: " & Err.Description, vbCritical, "ERRORE"
End Sub
In VB.net invece esiste un costrutto try...catch che ti permette di fare più o meno la stessa cosa (fai riferimento al manuale).
Spero di esserti stato d'aiuto, fammi sapere.
Ciao!!
lupusinfabula
Programmatore VB, ASP, Delphi.
ciao
codice:Private Sub TuaSub() On Error GoTo Errore ... ... ... Exit Sub Errore: if Err.Number=-2147217833 MsgBox "Qello che vuoi" ... ... end if End Sub