Focal Point
how to check whether a query was successful?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2831092232

June 13, 2007, 01:07 AM
Shankar
how to check whether a query was successful?
Hi,
I've two insert queries which are mutually exclusive.if my first query is successful then i want to skip the second one, and if first query doesnot do any insert then only i would like to get my 2nd query executed. Is there any keyword or syntax in WebFOCUS through which i could check whether a particular query was successful or not?
I am using Oracle8i,WinXP and WF713...
Thanks,
Shankar


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
June 13, 2007, 06:06 AM
Roland
Hi Shankar,

If you are using MODIFY for your inserts, then check out Statistical Variables
in Dialog Manager.

I do not know wether MAINTAIN is populating some variables also. And I am pretty sure SQL Passthrou will not. These two you would have to check out yourself.


Roland

Prod: WF 7.1.5
Test: WF 7.6.4
Unix Sun Solaris
HTML, PDF, EXL2K
June 13, 2007, 08:54 AM
jgelona
Can you can post your code? This should be relatively easy to do.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
June 13, 2007, 09:17 AM
Prarie
Something like this should work
-*FEX1
TABLE FILE CAR
PRINT CAR
END
-IF &LINES GT 0 GOTO EXIT;
-RUN
-*FEX2
TABLE FILE CAR
PRINT SALES
END
-EXIT


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
quote:
insert queries
must be an oxymoron (a phrase in which two words of contradictory meaning are used together for special effect, for example, “wise fool” or “legal murder”) - "insert" suggests Update, "queries" suggests Retrieval.

I stick the following code after every END statement (as well as other WF statements):
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO FOC_ERROR;



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Hi,
Thanks for all the suggestions.
I solved the issue using READ command of WebFOCUS.
Thanks,
Shankar


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML