Im trying to get all the entrys from a sqlite Database which have the same name as the keys in a Hashtable.
My Statement looks like this.
// the keys from the hashtable are names equivalent
// to name entrys in the SomeTable Names Collumn
Hashtable names;
String query = "SELECT Id, Name FROM SomeTable WHERE Name LIKE (@Names)";
SQLiteCommand command = new SQLiteCommand(query, _databaseConnection);
command.Parameters.AddWithValue("@Names", names.Keys);
SQLiteDataReader reader = reader.ExecuteReader();
while(reader.Read())
{
Console.WriteLine("Name: {0}, ID: {1}", reader[1].ToString(), reader[0].ToString());
}
Im totally sure there are similar values in the Database, but i get nothing back and the reader does not execute. Is it impossible to add a ICollection as a Parameter Value so i need to start the reader only one time?