Kirk Evans is a Microsoft Architect for the Azure Center of Excellence.
Introduction to SharePoint and Azure IaaS
Building SharePoint Apps with Windows Azure Platform as a Service
SharePoint Solutions and Architectures on Windows Azure Infrastructure Services
Understanding Authentication and Permissions with Apps for SharePoint and Office
Okay, this bit of code iterates through a loop, running a stored procedure for each pass. The only item that differs from the normal use of a stored procedure is the line that reads objComm.Parameters.Clear(). Without this line, the parameters would continue to be added and not reset as they should be.
[Scott Stoecker Blog]
Why would you .Clear the parameters? Wouldn't you simply set the new value of the existing parameter objects?
objComm.Parameters("strOne").Value = "new value 1"objComm.Parameters("strTwo").Value = "new value 2"
Another tip is to use the .Prepare method when accessing a resource that supports it.