T
timburda
Here is the scenario:
I am looking to execute the following query:
SELECT *
FROM TBL_USER
WHERE USER_ID IN ( 1,2,3,4)
Now, since in-line SQL is rightfully frowed upon, I am attempting to
use parameterized SQL, but I don't know how to create an
OracleParameter which can be used in an "IN" situation.
So, my code looks something like this:
string sql = "SELECT *
FROM TBL_USER
WHERE USER_ID IN USERID)"
//Not sure if the parameter type should be varchar2 or int - neither
seems to work
OracleParameter param = new OracleParameter("USERID","1,2,3,4")
whenever I execute the command to fill the dataset, I get an error from
the Oracle provider
Thoughts anyone?
thanks -
Tim Burda
I am looking to execute the following query:
SELECT *
FROM TBL_USER
WHERE USER_ID IN ( 1,2,3,4)
Now, since in-line SQL is rightfully frowed upon, I am attempting to
use parameterized SQL, but I don't know how to create an
OracleParameter which can be used in an "IN" situation.
So, my code looks something like this:
string sql = "SELECT *
FROM TBL_USER
WHERE USER_ID IN USERID)"
//Not sure if the parameter type should be varchar2 or int - neither
seems to work
OracleParameter param = new OracleParameter("USERID","1,2,3,4")
whenever I execute the command to fill the dataset, I get an error from
the Oracle provider
Thoughts anyone?
thanks -
Tim Burda