When this SQL error?

  • I have 2 unitest case.

    DECLARE c CURSOR FORM SELECT.....

    --When this SQL error

    OPEN c

    BEGIN TRANS

    ....

    --When this SQL error

    COMMIT

    How can i test it

  • Don't understand your question. i have a question for you though. Why are you using a cursor?

    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
  • Some times I don't understand why MS didn't make the CURSOR as undocumented feature 😀

    Or even better, to use a cursors they could make you to pay for a separate license :w00t::hehe::w00t:

    The above two mesures would be much better option than numerious information, discussions and advises on this subject 😀

    Or, may be this is a good sign!

    More and more Oracle developers are switching into SQL Server!

    :-D:-P:-D:-P:-D:-P:-D

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • GilaMonster (7/2/2010)


    Don't understand your question. i have a question for you though. Why are you using a cursor?

    I have 2 testcase:

    1: OPEN cursor error

    2: COMMIT error

    But i don't know when OPEN or COMMIT throw error.

Viewing 4 posts - 1 through 3 (of 3 total)

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