Issue Regarding Sql Server Procedure

procedures , sql server procedure , sql server performance Toronto, Canada
  • 12 years ago
    hi, I am working on an asp.net web application using sql server 2005. I have created some common procedures, like for inserting data I have procInsertData. this is a common procedure for all the tables. From the code behind I am providing the table name and fields(to be inserted) to the procedure. So, my concern is: - is it a good practice to pass table name and field names i.e. single procedure for every table? - should I use seprate procedure for each table. if so, should there be single procedure to add and update table? Please guide me, taking "Performance and Good Programming Practice" into consideration. Regards, Royal
  • 12 years ago
    **Just to update my above question:** The store procedure accepts the fields in a string(nvarchar(max)). from the code behind I am passing a string for values as well as a string for fieldnames.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'” - Isaac Asimov