DataTable MemoryDataTable = new DataTable("Table"); MemoryDataTable.Columns.Add("id", typeof(string)); DataRow MemoryDataTableRow = MemoryDataTable.NewRow(); MemoryDataTableRow["id"] = "1234"; MemoryDataTable.Rows.Add(MemoryDataTableRow); MemoryDataTableRow["id"] = "1235"; MemoryDataTable.Rows.Add(MemoryDataTableRow);then i would create a select statement to get data from a DataBase table using the rows from the memory Datatable, something like;
string select = "select a.id, a.name from Names a, (MemoryDataTable) b where a.id = b.id";The above code, or something similar, it's possible?
string select = "select a.id, a.name from Names a where a.id = '1234' or a.id = '1235'";With this 2 id's it's not difficult, but it can go to hundreds...