Jump to content

WebFOCUS success message after inserting/Update using SQL Passthrough


VisuaLizeFOCUS .

Recommended Posts

-* 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-EXIT

Resultant web page:

image.png.ee153225449249ae1c14477a7c9c9181.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...