Here’s what I did:
I was helped at least to some extent in that I do all database access through wrapper methods, because I want to log any errors. Like this:
sub dbquery (Extends dbh as sqlitedatabase, sql at String, where as String, ParamArray args as Variant) as RowSet
// Called when we expect a RowSet to be returned. Returns the RowSet if rows are found without error.
// Returns Nil if no rows found. Also returns Nil if an error occurs, in which case a message is logged also.
Var reg As RowSet, errnum As Integer, errmsg As String
try
reg = dbh.SelectSQL (sql, args)
Return reg // Worked fine, just return
Catch e as DatabaseException
app.dbErrorsCount = app.dbErrorsCount + 1
errnum = e.ErrorNumber
errmsg = e.Message
end try
dblogmsg (errnum, errmsg, where, sql, args)
Return Nil
End Sub
.
So I had to change at least these in only one place. Most of it is just a careful editing job.