Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Code......................................

1 How ... Pass Value Form DDL TO SQLHELPER FILE ..?
My code is


ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "GetemployeeId", new SqlParameter("@employeeId", Employeeid ," @firstname",Fname));
Posted

Create an array of SqlParameter and pass it to SqlHelper.ExecuteDataset() .

C#
SqlParameter[] paramArray = new SqlParameter[] {
                                               new SqlParameter("@employeeId",Employeeid),
                                               new SqlParameter("@firstname",Fname)

                                               };


ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "GetemployeeId", paramArray); 


P.S. This will only work if you have implemented ExecuteDataset to handle SqlParameter values being passed as an Array.
 
Share this answer
 
Comments
E.msk 30-Sep-10 5:00am    
Thanks bro
manognya kota 24-Jul-12 10:13am    
Good one...worked fine.thanks
Can you set a break point and step into it?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900