Try
dim s as string
dim rs As RecordSet
rs=db.SQLSelect(“select * from DATEINVENTAIRE”)
// database table above does not exist
s=rs.IdxField(1).Value
Catch e As NilObjectException
MsgBox “error”
End Try
Debugger stops with NilObjectException at line :
s=rs.IdxField(1).Value
So catch does not works…but i don’t know what the problem is.
Or turn off Break On Exceptions in the Project menu.
Or use the BreakOnExceptions Pragma:
#Pragma BreakOnExceptions Off
Try
// your code
Catch e As NilObjectException
// handle exception
End Try
#Pragma BreakOnExceptions Default // Restore setting from Project menu
Check the debugger. If break on exceptions is on it will break wen an exception is occoured. When that happens, you can see in the debbuger what is Nil (when you have catched a NilObiectException).
If ra is not nil, click in the debugger on the link right side of rs to see it’s content