I have a bit of a problem with a stringbuilder and converting it so that I can use it as a stored proc
The original code goes like this
The initial part of the stringbuilder is simple enough - it is something like
Expand|Select|Wrap|Line Numbers
- Dim foo as New StringBuilder() = String.Empty
- foo = string.format("DELETE dog FROM animal WHERE name='{0}'", winform.AnimalName.ToString())
If there is more than one selection, " OR name='{0}'" is added onto the end to build up the SQL command which is then executed. There is no limit to the number of " OR name='{0}'" that can be added
The problem is that I'd like to change this into a stored procedure. A single instance is easy enough, it's the second one which is messing me about.
Is there a simple way to convert this form of concatenation and converting it to a stored procedure?
Thanks