danchovasilev
Member
here is my sample code, but the result is not as expected
the result is: Измервам , променям
instead of everything: Мечо , Измервам , променям , мЕка , МЕТРО
my code:
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
#AdditionalJar:sqlite-jdbc-3.32.3.2
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private SQL As SQL
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
SQL.InitializeSQLite(File.DirApp, "dk6.db", True)
SQL.ExecNonQuery("CREATE TABLE IF NOT EXISTS table1 (col1 TEXT COLLATE NOCASE)")
SQL.ExecNonQuery("INSERT INTO table1 (col1) VALUES ('Мечо')")
SQL.ExecNonQuery("INSERT INTO table1 (col1) VALUES ('Измервам')")
SQL.ExecNonQuery("INSERT INTO table1 (col1) VALUES ('променям')")
SQL.ExecNonQuery("INSERT INTO table1 (col1) VALUES ('мЕка')")
SQL.ExecNonQuery("INSERT INTO table1 (col1) VALUES ('МЕТРО')")
mmSearch
SQL.ExecNonQuery("DELETE FROM table1")
End Sub
Sub mmSearch
Dim mStr As String
mStr="'%ме%'"
Log("mStr->" & mStr)
Dim tSql As String
tSql="SELECT * FROM table1"
tSql=tSql & " WHERE UPPER(col1) LIKE UPPER(" & mStr &")"
Log(tSql)
Dim Cursor As ResultSet
Cursor = SQL.ExecQuery(tSql)
If Cursor.IsInitialized Then
Do While Cursor.NextRow
Log(Cursor.GetString("col1"))
Loop
End If
Cursor.Close
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
the result is: Измервам , променям
instead of everything: Мечо , Измервам , променям , мЕка , МЕТРО