From Xojo Documentation

Revision as of 15:47, 12 November 2019 by PLefebvre (talk | contribs) (Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Double )
aSQLiteDatabase.Timeout = newDoubleValue
DoubleValue = aSQLiteDatabase.Timeout

Supported for all project types and targets.

The maximum number of seconds that an operation may wait before a lock is cleared (if any). The default is 10.


If an operation has to wait longer than this amount of seconds then the operation will fail (with a suitable SQL error).

If the value is less than or equal to 0 then all busy handlers will be disabled and the operation will wait indefinitely.

This value can be changed at any time.


This example sets the Timeout to 30 seconds.

Var dbFile As New FolderItem("MyDB.sqlite")

Var db As New SQLiteDatabase
db.DatabaseFile = dbFile

db.Timeout = 30

// Key was correct; DB is connected
MessageBox("Connected to database.")
Catch error As DatabaseException
MessageBox("Connection error: " + error.Message)
End Try