[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Print SQL in Error
- Subject: Re: Print SQL in Error
- From: John Milardovic <milardj@SX.COM>
- Date: Mon, 10 Jan 2000 09:56:51 -0500
Are you talking about a real error in terms of table not existing or invalid
column name or a logical error ie. no rows retrieved.
For the former use the "on-error" attribute of begin-select. In event of a
run time error control will go to the procedure specified and from that
procedure you can write to your log file.
For the latter use a counter variable and test its value after your sql
statement if 0 call procedure to write to the log.
Hope that is what you were looking for.
John Milardovic
> -----Original Message-----
> From: Dave Ingram [SMTP:Dave_Ingram@NAS.ADP.COM]
> Sent: Monday, January 10, 2000 9:32 AM
> To: SQR-USERS@list.iex.net
> Subject: Print SQL in Error
>
> Hello SQR experts:
>
> In the event that a SQL query fails, we would like SQR to print, to the
> log, the SQL code which was executing at the time of the error. Is there
> an SQR variable which contains the currently executing SQL query? Is
> there
> any way to do this?
>
> Dave