March 22, 2010 at 9:51 am
with stored procs, it's a best practice to add SET NOCOUNT ON as the first line of the proc;
this prevents other applications from thinking subsets or commands like (x row(s) affected) are recordsets.
add that and let us know if you are still having trouble with the proc.
Lowell
March 22, 2010 at 10:18 am
Thanks Lowell, I'll keep that in mind.
Think this was actually a scope issue, I was using sp_executesql within my sp, which I realize I don't have to do, was learning it at the time and hadn't re-written it yet.
When I was just executing the sp with null parameters to return everything, it worked great, but when defining a value, my dynamic sql was puking because I was referencing variables that didn't exist in the scope being executed.
Re-write seems to work, so I'm good, returns values to the dataset and everything.
Thanks,
Jon
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply