RAISERROR WITH NOWAIT doesnt

  • SQL2KSP3.

    From what I've read both in BOL and in a few places on-line, the RAISERROR WITH NOWAIT should display a message immediately, instead of waiting until the completion of execution. However, I haven't found that to be true. A simple script of:

    raiserror ('Message 1', 0, 1) WITH NOWAIT

    waitfor delay '00:00:05'

    raiserror ('Message 2', 0, 1) WITH NOWAIT

    doesn't show either message until the five seconds is up. This is just a trivial, repeatable example; I've tried several other uses in stored procedures that didn't work either.

    Have I misunderstood how this is supposed to work? Or am I doing something wrong?

    Thanks,

    Vince

  • That works as expected on my system

    How are you testing it ? QA, VB ...

     


    * Noel

  • Sorry. I'm using QA 8.00.760 running against SQL2KSP3. I've tried it on several different PC's running that QA, running against several different servers.

    By "as expected", you mean you see "Message 1" immediately, then "Message 2" five seconds later?

    If so, that's really odd. I don't see how it's possible for me to mess this up.

    Vince

  • Yep That's Right "Message 1" immediately, then "Message 2" five seconds later.

    Are you using QA with Results in Text ? if not, try it!

    HTH

     


    * Noel

  • Doh! See, it was easier to mess this up than I thought.

    I'd blame it on being sick, but I'm not sure it would have mattered. Of course, when in grid mode, QA doesn't switch to the Messages tab until the batch is finished. So it looked like both messages were appearing simultaneously. Switching to text works, but so does checking the %&#*(%& Messages tab before the batch is complete.

    Sorry for the noise, thanks very much for the help.

  • This reply has been reported for inappropriate content.

    Same issue i faced the. Output option was selected in "Result to GRID" format had to change it to "Result to Text"

Viewing 6 posts - 1 through 5 (of 5 total)

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