Possible Duplicate:
Parameterizing a SQL IN clause?
How do I translate the following query to a prepared statement (if possible..)?
string allemails = "[email protected], [email protected], [email protected]"; //etc...
string query = "select UNIQUE_ID users where E_MAIL in (" + allemails + ")";
//run query....
Can I do something like:
OdbcCommand cmd = sqlConn.CreateCommand();
cmd.CommandText = "select UNIQUE_ID users where E_MAIL in (?)";
If so, what is the parameter I should add to the cmd parameters collection, and if it's varchar, how can I ask for unlimited size?