Var db As New ODBCDatabase
db.DataSource = _
"DRIVER=ODBC Driver 17 for SQL Server;" + _
"DATABASE=TEST;Trusted_Connection=Yes;SERVER=localhost"
db.Connect
try
db.ExecuteSQL("selecf 1")
catch e As RuntimeException // e vanished from the debug window
Var ex As Variant = e // so does ex
Var isDbEx As Boolean = e Isa DatabaseException
break
End
break
I don’t know if this is the solution to your problem, but I invite you to place this instruction: #Pragma BreakOnExceptions
Your code would be:
#Pragma BreakOnExceptions on
Try
//execute update
db.ExecuteSQL(sql,LogID)
Return True
Catch e As DatabaseException
ShowError e.Message, CurrentMethodName
Return False
end Try
#Pragma BreakOnExceptions off