From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )
aSQLiteDatabase.ThreadYieldInterval = newIntegerValue
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.


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.


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

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

Var db As New SQLiteDatabase
db.DatabaseFile = dbFile

db.ThreadYieldInterval = 200

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