On 27 Jan 2017, at 5:59pm, Clyde Eisenbeis <[email protected]> wrote:

> sqliteCmd.CommandText = SELECT fstPriority, fstInfo, fstDateCreated,
> fstDateModified, fiKeyID FROM  MemoPadTable  WHERE fstInfo LIKE '%' ||
> ?1 || '%'"
> 
> liststLikeFieldValue[0] = "bruce"

Please try the following:
Change ?1 to @param1.
Change your new SQLiteParameter.

-----

System.Data.SQLite.SQLiteCommand sqliteCmd = sqliteConnection.CreateCommand());

sqliteCmd.CommandText = "SELECT" + stFieldNames + "FROM " +
stTableName + " WHERE " + stLikeFieldName + " LIKE '%' || @param1 || '%'";

sqliteCmd.Parameters.Add(new SQLiteParameter("@param1",
liststLikeFieldValue[0]));

SQLiteDataReader sqlReader = sqliteCmd.ExecuteReader();

-----

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to