Eg. can I write something like this code:
public void InactiveCustomers(IEnumerable customerIDs)
{
//...
myAdoCommand.CommandText =
As was mentioned in a comment, Erland Sommarskog wrote a series of articles on this topic (linked-to below). The articles are very thorough and can serve as reference material. While they are specific to SQL Server (T-SQL), some of the techniques mentioned might also work for other RDBMS (such as using an XML
data type):
Arrays and Lists in SQL Server 2008 Using Table-Valued Parameters:
Arrays and Lists in SQL Server 2005 and Beyond When TVPs Do Not Cut it:
Arrays and Lists in SQL Server 2000 and Earlier