3
Answers

Pass comma separated string to procedure

Rohit

Rohit

8y
334
1
Hi,
 
in my one of report i using store procedure where i used spit function to and working fine procedure now i calling this procedure in code and i want pass variable but from i pass like ('1,2,3')
but its not working in .........how  do i pass comma separated string  from code to store procedure please help me
Answers (3)
0
o k

o k

NA 3 2k 11y
code  to insert data  into table .program ask user to enter item name , id , price ,quantity .


public static void save(EntityPurchase epr)
        {
            OleDbDataAdapter da=new OleDbDataAdapter("Insert into shop values ('"+epr.Itemid+"','"+epr.Iname+"','"+epr.Quantity+"','"+epr.Price+"','"+epr.Curdate+"')",con);
            ds=new DataSet();
            da.Fill(ds,"temp");
        
        }


i have no idea about using sum clause n group by clause can you just explain it here ? any related links will be helpful
0
Veena Sarda

Veena Sarda

NA 18.3k 1.5m 11y
Could you show your code for adding 10 Car and trucks. Have you tried using sum clause and group by statement.