'Create Index Sub CreateIndex(SQL As SQL, TableName As String, IndexName As String, Fields As String, Unique As Boolean) Dim query, uni As String uni = "" If Unique=True Then uni = "UNIQUE" query = "CREATE " & uni & " INDEX IF NOT EXISTS " & IndexName & " ON [" & TableName & "] (" & Fields & ")" Log("CreateIndex: " & query) SQL.ExecNonQuery(query) End Sub 'Delete Index Sub DropIndex(SQL As SQL, IndexName As String) Dim query As String query = "DROP INDEX IF EXISTS " & IndexName Log("DropIndex: " & query) SQL.ExecNonQuery(query) End Sub
Source: Billy047 @ http://www.basic4ppc.com/android/forum/threads/dbutils-android-databases-are-now-simple.8475/page-2
Last Updated on December 30, 2015