I have a fts4 table which I want to change to fts5. I have to replace docid with rowid. But either I get a syntax error for the select or no result.
Original code:
dim PreparedForSearch as SQLPreparedStatementMBS = SQLiteIndexDBMBS.Prepare("SELECT docid FROM bodyindex WHERE messagebody MATCH ?")
PreparedForSearch.BindType(0, PreparedForSearch.kTypeString)
SearchString = SearchString.ReplaceAll("""", """""")
dim data as RowSet = PreparedForSearch.SelectSQLMT("'*'" + searchstring + "'*'")
This makes a syntax error. I tried some variations of the last line like
dim data as RowSet = PreparedForSearch.SelectSQLMT("*" + searchstring + "*")
But this also makes a syntax error. The following variation does not make a syntax error but the query doesn’t give any result:
dim data as RowSet = PreparedForSearch.SelectSQLMT(searchstring)
What is the magic combination of * and '?