VisuaLizeFOCUS . Posted August 25, 2022 Share Posted August 25, 2022 Hey guys we are using SQL Passthru in one of our report. Actions performed:InsertionUpdateAfter performing the action we need to display if the operation is success or not. Is there any variable that can be used in WebFOCUS.Any thoughts ? Link to comment Share on other sites More sharing options...
David Briars Posted August 25, 2022 Share Posted August 25, 2022 -* Create values to be inserted into table.-*-SET &NAME = 'David M. Briars IV';-SET &GROUPNAME = 'Information Technology';-*-* Insert values into database.-*ENGINE SQLMSS SET DEFAULT_CONNECTION CON02 SQL SQLMSS BEGIN TRY BEGIN TRAN INSERT INTO AdventureWorks2017Test.HumanResources.Department (Name ,GroupName ,ModifiedDate) VALUES ('&NAME', '&GROUPNAME', CURRENT_TIMESTAMP) COMMIT TRANEND TRY BEGIN CATCH ROLLBACK TRANEND CATCH END-RUN-TYPE &ROWSAFFECTED rows affected-TYPE &FOCERRNUM = FOCERRNUM-TYPE &RETCODE = MSSQL Error RETCODE-*-EXIT-*-* Present results to the user.-*-HTMLFORM BEGIN<h1> Success or Not? </h1><br>!IBI.AMP.ROWSAFFECTED; rows affected by SQL <BR>!IBI.AMP.FOCERRNUM; = FOCERRNUM <BR>!IBI.AMP.RETCODE; = MSSQL Error RETCODE-HTMLFORM END-EXITResultant web page: Link to comment Share on other sites More sharing options...
VisuaLizeFOCUS . Posted August 26, 2022 Author Share Posted August 26, 2022 Thanks David Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now