You are accessing the Members Only area for DynDeveloper.com using guest access. The member experience is slightly different
Leah
4Penny.net
Points: 7716

6/8/2018 12:05:37 PM

eConnect taItemSite Wrapper

* This article, and all our great .NET Development documentation, Is available on the .NET Development menu

This stored procedure wraps the eConnect taItemSite stored procedure, making it easier to call. 

It also returns the full error text in case of an error, and not just the cryptic error ID

4Penny.net
Version: All
Section: SQL Scripts
IF EXISTS (SELECT name
       FROM   sysobjects
       WHERE  name = N'dd_taItemSiteWrapper'
       AND    type = 'P')
    DROP PROCEDURE dd_taItemSiteWrapper
GO
 
CREATE PROCEDURE dd_taItemSiteWrapper
 
-- dd_taItemSiteWrapper 'mortarcovers~~','020',0
 
@ITEMNMBR varchar(30),
@LOCNCODE varchar(10),
@UpdateIfExists int
 
AS
 
set transaction isolation level read uncommitted
DECLARE @O_iErrorState INT,
    @oErrString VARCHAR(256),
    @ErrorDesc VARCHAR(256)
 
SELECT @O_iErrorState = 0
 
EXEC taItemSite
    @I_vITEMNMBR = @ITEMNMBR,
    @I_vLOCNCODE = @LOCNCODE,
    @I_vUpdateIfExists = @UpdateIfExists,
    @O_iErrorState = @O_iErrorState OUT,
    @oErrString = @oErrString OUT
 
IF @O_iErrorState > 0 BEGIN
    SELECT @ErrorDesc = tec.ErrorDesc
        FROM dynamics..taErrorCode tec
        WHERE tec.ErrorCode = @O_iErrorState
END ELSE BEGIN
    SELECT @ErrorDesc = ''
end
 
 
SELECT @O_iErrorState AS ErrorState, @oErrString AS ErrString, @ErrorDesc AS ErrorDesc
 
 
 
GO
 
grant exec on dd_taItemSiteWrapper to public
--  sp_sps 't'
Please leave a comment

Add a Comment



Subscribed. You will receive emails if the article is updated or comments are added

Comments

body header
No records to display.
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3