I think that the statement "All the parameters will take automatically with their datatype." indicates a dangerous way to proceed. This is because SqlDbTypes (or OdbcTypes) do not map directly to .NET Framework types. You should avoid any implicit typecasting and find a way to specify the correct SqlDbType for each parameter.
Besides that, your requirement is pretty standard and most DataLayer implementations feature some such functionality. All three of the INSERT, UPDATE and DELETE operations are executed by the SqlCommand.ExecuteNonQuery() method, so you need only have a single function that can execute any Stored proc. and return the no. of rows affected. On Dec 3, 4:33 pm, Hozefa Unwala <[email protected]> wrote: > Hello Everyone, > > I want to develop one class which has three function for > Insert,Update,Delete. > But I want to use stored procedure. > class file with sqlcommand and parameters > Parameter comes automatically take a key and value. > > Now in code behind i just want to pass the name of stored proedure and > controls only. > All the parameters will take automatically with their datatype. > > So in any form i can use insert ,update,delete with any table. > > Thanks in advance. > -- > Hozefa Unwala
