sqlca.isconnected

returns true if the database connection exists

 

if <sqlca.isconnected> = false then
  // sql connection lost!
end if