SQLitePrepare

This works
Dim ps As SQLitePreparedStatement
ps = SQLitePreparedStatement(CustomerDB.Prepare("SELECT * FROM Customers WHERE FirstName LIKE ? "))

BUT this don’t (I think the SELECT SQL is correct…)

ps = SQLitePreparedStatement(CustomerDB.Prepare(“SELECT * FROM Customers WHERE FirstName LIKE ? OR LastName like ?”))


ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0, TextField1.Text)
Dim rs As RecordSet = ps.SQLSelect

The target is to get a recordset with all people, with the value entered in the textfield, in first or last name.

did you check db.ErrorMessage for details?
And do you actually bind parameter with index 1 if you have two question marks?

ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT) ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT) ps.Bind(0, TextField1.Text + "%") Dim rs As RecordSet = ps.SQLSelect

You need to specify the bind type. Also the filter field needs at least the % after the filter (and maybe one before).

Thanks to all, I found that this works:

ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
ps.BindType(1, SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0, TextField1.Text)
ps.Bind(1, TextField1.Text)