[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQL Paragraph Error Checking
Sorry,
Forgot to mention that I've tried that. I get the same results with or
without the on-error.
Mark
Rhonda Hudgins
<RHudgins@GENE To: SQR-USERS@list.iex.net
NCOR.COM> cc:
Sent by: Subject: Re: SQL Paragraph Error
Checking
"Discussion of
SQR, Brio
Technology's
database
reporting
language"
<SQR-USERS@lis
t.iex.net>
08/24/00 04:27
PM
Please respond
to sqr-users
You probably want to add an ON Error condition
Begin-SQL On-Error=DB_Error
Update Mark
set ...
end-sql
! -=-=-=-=-=-=-=-==-==-=-=-=-=-=-=-=-=-=-=-=-=-=
begin-procedure DB_Error
! -=-=-=-=-=-=-=-==-==-=-=-=-=-=-=-=-=-=-=-=-=-=
display 'DB_Error'
display '-------------------------------'
Show ' SQL Error occured in the Insert_Records procedure.'
show $SQL_ErrorText
show 'Error Number: ' #sql-status
show 'SQL-Error: ' $sql-error
stop Quiet !stops program w/out
aborting
end-procedure ! -- end DB_Error
Thanks!
Rhonda Hudgins
@}---'----,----
Genencor International, Inc
716/256-5266
rhudgins@genencor.com
Mark Castleberry
<Mark.Castleberry@SH To:
SQR-USERS@list.iex.net
AWINC.COM> cc:
Sent by: "Discussion Subject: SQL Paragraph
Error Checking
of SQR, Brio
Technology's
database reporting
language"
<SQR-USERS@list.iex.
net>
08/24/2000 03:34 PM
Please respond to
sqr-users
Hello,
I am confused about when SQR checks for errors in a SQL paragraph.
On my PeopleSoft single user version, SQR 4.2.3 Sqlbase 6.1.2 the
following code will cause the SQR to abort BEFORE it compiles . . .
BEGIN-PROCEDURE Test-MC
BEGIN-SQL
UPDATE MARK
SET MARK = 'MARK'
END-SQL
END-PROCEDURE
The error I get is the following . . .
(SQR 5528) SQLBase SQLCOM error 601 in cursor 2:
Table has not been created
SQL: UPDATE MARK SET MARK = 'MARK'
Error at : MARK
Error on line 272:
(SQR 3716) Error in SQL statement.
I am glad I get this error. There is no table named MARK so I want SQR
to prevent the program from running in the first place.
However, in our development environment, SQR 4.3.4/ODBC Level 2
connecting to DB2, the SQR WILL compile and only generates an error if the
section of code is encountered. Again, the SQR WILL compile with invalid
sql.
What is the cause of this? Different SQR version, different database, a
setting that I am missing?
Any help would be greatly appreciated,
Mark Castleberry