SQLiteDatabase.ThreadYieldInterval

From Xojo Documentation

Property (As Integer )
aSQLiteDatabase.ThreadYieldInterval = newIntegerValue
or
IntegerValue = aSQLiteDatabase.ThreadYieldInterval

Supported for all project types and targets.

Yields time back to your application every N virtual machine instructions. The unit is virtual machine instructions.

Notes

A value of zero means disabled. Higher values mean less time to your applications and more time to SQLite. There is no "best" value to use, since one cannot know in advance how many virtual machine instructions are required in order to execute an SQL statement. If performance is a problem, the user should try different values and use among the ones that work well for their application.

In most situations you should not need to change this value from its default of 0.

Example

This example sets the value of ThreadYieldInterval. Please keep in mind that users need to experiment to find a good value for their case.

Dim dbFile As GetFolderItem("MyDB.sqlite")

Dim db As New SQLiteDatabase
db.DatabaseFile = dbFile

db.ThreadYieldInterval = 200

If db.Connect Then
// Key was correct; DB is connected
MsgBox("Connected to database.")
Else
MsgBox("Connection error: " + db.ErrorMessage)
End If