Re: [firebird-support] Firebird 4 and RDB$ERROR

2019-05-16 Thread Frank Schlottmann-Gödde fr...@schlottmann-goedde.de [firebird-support]
Am 16.05.19 um 10:49 schrieb sbai...@mutualconsultants.ltd.uk 
[firebird-support]:
>
> Maybe this question is also off-topic, but can you tell me which group 
> I should use for posting questions about FB4 Beta 1?

This would be

https://lists.sourceforge.net/lists/listinfo/firebird-devel

hth

fsg



Re: [firebird-support] Firebird 4 and RDB$ERROR

2019-05-16 Thread sbai...@mutualconsultants.ltd.uk [firebird-support]
Helen, 

 Thanks for the prompt reply.
 

 You wrote:
 "So - off-topic in Firebird Support. But, anyway..."
 

 Apologies for that. I did not read the welcome email (which says no questions 
on alpha or beta releases) until after I had posted my question (assuming 
Firebird Support was the right group).
 

 Maybe this question is also off-topic, but can you tell me which group I 
should use for posting questions about FB4 Beta 1?
 

 Steve.


Re: [firebird-support] Firebird 4 and RDB$ERROR

2019-05-15 Thread Helen Borrie hele...@tpg.com.au [firebird-support]
Steve Bailey wrote:

> I am using Firebird 4.0 Beta 1.

So - off-topic in Firebird Support.  But, anyway...

> The release notes describe a new system function RDB$ERROR:

> "The function RDB$ERROR() takes a PSQL error context as input and
> returns the specific context of the active
> exception. Its scope is confined to the context of the
> exception-handling block in PSQL. Outside the exception
> handling block, RDB$ERROR always returns NULL"

>  To test this in iSQL I have tried: select rdb$error(gdscode) from 
> rdb$database

> This results in:
> Statement failed, SQLSTATE = 42000
> Dynamic SQL Error
> -SQL error code = -104
> -Token unknown
> -GDSCODE

> I was expecting NULL to be returned. Have I misunderstood?
>
Yes.  You read that text in the chapter entitled 'PSQL'.  That's
procedural SQL, the language for writing stored procedures, triggers
and executable blocks.  And it's about the exception-handling block in
PSQL - meaning you will get null if you try to access it from a part
of your PSQL code that is not an exception handling block.  Logically,
that's because the current exception is visible only within the EH
block and, of course, only if an exception actually occurred that
threw execution into the EH block.

Nowhere does it suggest that you could expect anything by trying to
use the function in DSQL.

Helen



---
This email has been checked for viruses by AVG.
https://www.avg.com



[firebird-support] Firebird 4 and RDB$ERROR

2019-05-15 Thread sbai...@mutualconsultants.ltd.uk [firebird-support]
I am using Firebird 4.0 Beta 1. The release notes describe a new system 
function RDB$ERROR:
 "The function RDB$ERROR() takes a PSQL error context as input and returns the 
specific context of the active
exception. Its scope is confined to the context of the exception-handling block 
in PSQL. Outside the exception
handling block, RDB$ERROR always returns NULL"  To test this in iSQL I have 
tried: select rdb$error(gdscode) from rdb$database

 

 This results in:
 Statement failed, SQLSTATE = 42000
 Dynamic SQL Error
 -SQL error code = -104
 -Token unknown
 -GDSCODE
 

 I was expecting NULL to be returned. Have I misunderstood?