Stored Proc Error Handling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pachydermitis

    Stored Proc Error Handling

    Hi all,
    I have a sproc that uses OpenRowset to an Oracle db. If OpenRowset
    errors, it terminates the procedure. I need it to continue
    processing. Is there any workaround for this?
    Thanks
    Pachydermitis
  • Mike

    #2
    Re: Stored Proc Error Handling

    Sorry no solution, just a have a similar problem when enabling
    constraints in a stored proc

    WHILE @@FETCH_STATUS = 0
    BEGIN
    SELECT @sSQL = 'ALTER TABLE [' + @sTableName + '] ' WITH CHECK CHECK
    CONSTRAINT ALL'

    EXEC sp_executesql @sSQL

    IF @@Error <> 0
    BEGIN
    SELECT '***Error enabling constraint ' + @sSQL
    END

    FETCH cTable
    INTO @sTableName

    END


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    Working...