Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 using for loops with parameters.delete

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-06 : 23:19:27
mary writes "I am trying to streamline my code by using the following:
For each spItem in comm.parameters
comm.parameters.delete "spItem.Name"
Next

This replaces:
comm.parameters.delete "@pLast"
comm.parameters.delete "@pFirst", etc.

When doing a response.write on the items, I get the same results from both. However, when I run the one with the loop, it causes a type mismatch error in the following stored procedure. When I list each delete seperately, everything works fine. I use SQL Server 6.5. The server has Windows NT with service pack 5, I think. HELP!"
   

- Advertisement -