[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: handling errors



try the on-error routine like
begin-procedure some-procedure
begin-sql on-error=error-handler
select statement
end-sql
end-procedure some-procedure


begin-procedure error-handler

        show 'Your error message'

end-procedure


I will also use this routine to do an either or, insert if not exist, if so
it will error an in the error procedure do an update instead.

hope that helps


-----Original Message-----
From: Discussion of SQR, Brio Software's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Brickl, Maria
Sent: Wednesday, March 20, 2002 1:23 PM
To: SQR-USERS@list.iex.net
Subject: handling errors


How does one handle errors such as the unique constraint error in SQR
programs. I know there will be a unique constraint on the following program
if I try loading values which are already in the table. What I would like to
get is a message saying that those values are already loaded rather than the
oracle errror you get. And then have it End the program and maybe write
duplicate values to a error report.

Where in your program do you put that? And what is the coding?

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Maria K Brickl
Information Systems Programmer/Analyst
University of Wisconsin Colleges
780 Regent St, PO Box 8680, Madison, WI  53708-8680
Phone: 608.265.2677 / Fax: 608.265.5770
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 03/14/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 03/14/2002