Try using a PreparedStatement.
Something like this:
Dim ps As SQLitePreparedStatement
ps = SQLitePreparedStatement(db.Prepare("SELECT * FROM table1 WHERE name = ? "))
ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0, "Hrisson")
Dim rs As RecordSet = ps.SQLSelect
[quote=149261:@Albin Kiland]Try using a PreparedStatement.
Something like this:
Dim ps As SQLitePreparedStatement
ps = SQLitePreparedStatement(db.Prepare("SELECT * FROM table1 WHERE name = ? "))
ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0, "Hérisson")
Dim rs As RecordSet = ps.SQLSelect
well I have to import some files with 10k+ records in each, and records with same names that must merge and not create another record.
so this is a one time and debug only work, I’m not sure I need to use the PreparedStatements ?
or does the PreparedStatements make some filterings on the input text ?
Have you tried executing the same query in a db editor like Sequel (MySQL) or SQLiteManage (SQLite) ? If you get a result when searching for “Hrisson”, you know the problem is on the query side in your app. If you don’t get a result, the imported data was not encoded in utf8.
well the preparedstatements did not lead to a solution…
I used select * from table1 where upper(name)=upper('Hrisson')
and it did not work.
even with the preparedstatement : select * from table1 where upper(name)=upper( ? )
then I used the terms : select * from table1 where name='Hrisson' collation nocase
and everything worked fine !