How can I use the Like Operator with a Parameter in a SQLite query?
问题 I can get the result I expect by entering this in LINQPad: SELECT * FROM WorkTable WHERE WTName LIKE "DSD__20090410014953000%" (it shows me the record which has a WTName value of DSD__20090410014953000.xml") But trying to do this programmatically is proving trying. I tried: const string qry = "SELECT SiteNum FROM WorkTable WHERE WTName LIKE @wtName%"; using (SQLiteConnection con = new SQLiteConnection(HHSUtils.GetDBConnection())) { con.Open(); SQLiteCommand cmd = new SQLiteCommand(qry, con);