IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    how to check whether a query was successful?
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
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
 
Posts: 60 | Location: India | Registered: April 21, 2007Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
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
 
Posts: 54 | Location: Switzerland | Registered: May 13, 2003Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
Can you can post your code? This should be relatively easy to do.


Prod WF 7.1.3 (z90/Suse Linux) DB (Oracle 10g), Self Serv, Report Caster, WebServer Win2003
 
Posts: 300 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
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


WebFOCUS 7.6.1 Win 2003 Test -7.6.5
 
Posts: 1188 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
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



Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4
Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000
Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2
Output formats: HTML, Excel 2000 and PDF
 
Posts: 3379 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
Hi,
Thanks for all the suggestions.
I solved the issue using READ command of WebFOCUS.
Thanks,
Shankar
 
Posts: 60 | Location: India | Registered: April 21, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    how to check whether a query was successful?

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.