Unable to return dataset fields?

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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