Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Displaying error page when 0 updates occurred with sql passthru

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Displaying error page when 0 updates occurred with sql passthru
 Login/Join
 
Guru
posted
I have searched the forums and have seen several posts taking different approaches to capturing the SQL update message. i.e.:


--------------------------------------------------------------------------------

Your request did not return any output to display.
Possible causes:
- No data rows matched the specified selection criteria.
- Output was directed to a destination such as a file or printer.
- An error occurred during the parsing or running of the request.


--------------------------------------------------------------------------------


(FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND : 2/UPDATE

The only instance I care about is when the message returns: 0/UPDATE. I already know about the &&MSGVAR variable which in this case returns FrownerFOC1364) ROWS AFFECTED BY PASSTHRU COMMAND.
The &RECORDS variable, of course, contains 0 since there was no output to display. Is there another way to get that last piece of the error message, or, more importantly, be able to tell it was 0 updates without having to go through the trace files.

Basically if 0 records were updated, I would like to display an error message. Any ideas?
Thanks in advance

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Maybe it would be easier with a Modify command?
My code is
 
ENGINE SQLMSS SET DEFAULT_CONNECTION server
SQL SQLMSS
UPDATE table
SET col1 = '&var1'
WHERE col2 = '&var2';
END
-RUN

-IF &&MSGVAR EQ ' (FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND' THEN GOTO SUCCESS;
-INCLUDE COMMON_UPDATEFAILED
-GOTO END_PRGM;
-SUCCESS
-INCLUDE COMMON_UPDATESUCCESS
-END_PRGM
 


The current code covers all that I need except if no updates occur.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Always solved after a forum post...
&ROWSAFFECTED is the variable I was looking for

Capturing Rows Affected by Direct SQL Passthru Commands as Dialogue Manager Variables


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Displaying error page when 0 updates occurred with sql passthru

Copyright © 1996-2020 Information Builders