problem with function

  • My guess is that the ASP page is actually running your query twice. I've seen this before. I haven't done much research into why it happens, but I've had to modify several things to prevent it from screwing up my own stuff. You should see it happening via a trace as Gail is suggesting.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Magy (11/26/2008)


    Gail, I'm in SQL profiler, and I ran it while executing the stored proc. Is there anything I should be looking for besides stmtCompleted? I see a bunch of queries, but I am not sure how to debug using this.

    That's going to show you exactly what executes within the proc, so you will be able to see the IF EXISTS statement execute. If the two updates are running then you'll see those as well straight after the if exists.

    Basically it's just showing you exactly what happens when you run the proc from the ASP page. Make sure that you're only seeing your own executions, otherwise it'll get near impossible to track anything.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply