As requested here is an example of a function that will work around the issue of losing a database connection, perhaps due to it timing out for some another reason.
The basic idea is to use a function to return the database id when you need it, this function checks if the current connection is still open and if not opens a new connection automatically.
Code: Select all
function databaseGetConnectionID
if sDatabaseConnectionID is among the lines of revOpenDatabases() then
return sDatabaseConnectionID
else
databaseConnect the uOptionText of group "databaseType" of card "contacts"
return sDatabaseConnectionID
end if
end databaseGetConnectionID
Kind regards
Elanor