troubleshooting Question

Replacing Stored Proc Parameter each time

Avatar of sbornstein2
sbornstein2 asked on
C#
8 Comments1 Solution293 ViewsLast Modified:
Hi all I have a stored proc and code that sets parameters etc.  I need to use the same insert 10 times and replace two parameters each time.  How do I do that?  For example,

command.Parameters.Add("@MYID", SqlDbType.Int).Value = 25;
command.Parameters.Add("@MYHRS", SqlDbType.Int).Value = 6;

then I run it.   Next lines I need to replace the above values?

command.Parameters.Add("@MYID", SqlDbType.Int).Value = 87;
command.Parameters.Add("@MYHRS", SqlDbType.Int).Value = 43;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros