Posted on: 1/22/2014 4:03:15 PM | Views : 1204

Hi all,
    I have a oracle table with dynamic queries, for example
FieldName      <DynamicSQL customerName     Select customerName from customer where customerId = :customerId And i am trying to read the dynamic sql and pass the customerId as parameter. My code looks like
string dynamicSQL = cmd.ExecuteScalar().ToString(); //dynamicSQL = "select customername from customer where customerID= :customerID" I will have the value of cutomerID in my program and to pass the customerID parameter to query above i split the string after ":" and then pass the customerID value as parameter.
string[] parameter = dynamicSQL.split (':') //paramteter[0]= "select customername...customerID=" parameter[1]=customerID for (int i = 0; i <= parameter.Length - 1; i+ ...

Go to the complete details ...