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.
We have a few projects that users need to be add items to exclusion lists or log commentary into our AS400 DB.
We are using SQL Passthrough for this and everything works great...
However we get the message:
(FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND : 1/INSERT
On a failure or issue something along these lines:
(FOC1400) SQLCODE IS -803 (HEX: FFFFFCDD)
: [23505] Duplicate key value specified.
(FOC1414) EXECUTE IMMEDIATE ERROR.
Obviously the users have no idea what either means.
So my question is based on the success or failure can we use HTML forms to display the correct "nice" message when it works or doesn't based on the insert or failure?
When we looked at inserting rows into Oracle, via SQL Passthru, we found several ampervariables that supported us tesing the success or failure of the insert.
In the code below we use &ROWSAFFECTED to present an HTML page, in the event of a bad result.
...
ENGINE SQLORA
INSERT INTO schema.tablename
-*INSERT INTO tablename
VALUES ('&FRED_ID',
'&WILMA_TEXT',
TO_DATE('&NOW','MM/DD/YYYY HH24:MI:SS'),
'&IBIMR_user',
'&SEQ',
'&SOURCE')
;
COMMIT;
END
-RUN
-TYPE FocErrNum = &FOCERRNUM
-TYPE Records = &RECORDS
-TYPE Oracle Err Num = &RETCODE
-TYPE RowsAffected = &ROWSAFFECTED
-IF &ROWSAFFECTED LE 0 GOTO ADD_ERROR;
When people are inserting comments into the system we are using something like this with other fields and audit fields:
INSERT INTO LIBRARY/TABLE (USER, COMMENT)
VALUES ('&IBIMR_user','&COMMENT')
This works great unless someone uses an apostrophe in their comment box. So anything like didn't, or names like D'Andrea, etc gives them our new error message.
Anyway to convert the text box to insert correctly and not have apostrophe effect the SQL?
The text box is in an HTML form that they fill out and submit.
(FOC1400) SQLCODE IS -104 (HEX: FFFFFF98)
: [42601] Token M was not valid. Valid tokens: ) ,.
(FOC1414) EXECUTE IMMEDIATE ERROR.
INSERT INTO LIBRARY/TABLE (USER, COMMENT)
VALUES ('&IBIMR_user','&COMMENT')
**TRACE**
INSERT INTO LIBRARY/TABLE (USER, COMMENT)
VALUES ('JCARBE','I'm here to help!')
O, yes thank you, very helpful... I know how to do it, just not how to take the variable and do it through WebFOCUS.
How do I take the user input and add the extra quotation? I'm guessing there is a way to do it in the dialogue manager? I was looking at STRIP, but we have never used it outside of a define/compute. Looking through all the character commands possibly GETTOK? Was trying to get input of what others had been successful in the past.
Developing Reporting Applications > Managing Flow of Control in an Application > Creating a Standard Quote-Delimited String
&var.QUOTEDSTRING
quote:
Consider the following SQL Translator request:
SET TRACEUSER = ON SET TRACEON = STMTRACE//CLIENT SQL SELECT * FROM SQLVID WHERE LASTNAME = &1.QUOTEDSTRING; END
...
In the generated SQL request, the character string used for the comparison is correctly enclosed in single quotation marks, and the embedded single quote is doubled: