Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Unanswered: raiserror on trigger c++

    I'm using Visual c++ and sybase.
    I create a trigeer.

    ///////////////////////////////////////////////////////////////////////////////
    create trigger [%QUALIFIER%]%TRIGGER% on [%QUALIFIER%]%TABLE% for delete as
    declare
    .DeclDeleteParentRestrict
    @numrows int,
    @errno int,
    @errmsg varchar(255)

    select @numrows = @@rowcount
    if @numrows = 0
    return

    .DeleteParentRestrict

    return

    /* Errors handling */
    error:
    raiserror @errno @errmsg
    rollback transaction
    end
    /////////////////////////////////////////////////////////
    Everthing is ok only i do n't now how i could get raiserror in visual c++.

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    When raiserror is executed, the error number is placed in the global variable @@error, which stores the error number that was most recently generated by the system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •