Subject | Catching True and False of the SQL statement. |
---|---|
Author | jgijbels |
Post date | 2005-03-14T09:22:38Z |
Hi All,
Have a question about the Boolean type. After adding a domain with
this code:
CREATE DOMAIN D_BOOLEAN AS
SMALLINT
DEFAULT 0
CHECK (value BETWEEN -1 and 0)
I created a Boolean as I found the information somenwhere on the
internet. I used -1 for True because this is standard for VB.NET
(which I use).
Now my problem is I have a full application running on a MSAccess
database (which I'm changing to Firebird of course). But when I do an
UPDATE or INSERT query with True or False in it, I get an error:
Column does not belong to referenced table.
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
TRUE.
At line 3, column 73.
Now I was wondering, is there a way to catch the False and True and
change them to an integer (resp. 0 and -1), before the triggering of
they error (maybe in a trigger "before update/insert"???). Otherwise
I'm obligated to change all SQL statements in my application... I
don't fancy this solution, as you would guess.
Thanks in advance and God bless you,
Joël.
Have a question about the Boolean type. After adding a domain with
this code:
CREATE DOMAIN D_BOOLEAN AS
SMALLINT
DEFAULT 0
CHECK (value BETWEEN -1 and 0)
I created a Boolean as I found the information somenwhere on the
internet. I used -1 for True because this is standard for VB.NET
(which I use).
Now my problem is I have a full application running on a MSAccess
database (which I'm changing to Firebird of course). But when I do an
UPDATE or INSERT query with True or False in it, I get an error:
Column does not belong to referenced table.
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
TRUE.
At line 3, column 73.
Now I was wondering, is there a way to catch the False and True and
change them to an integer (resp. 0 and -1), before the triggering of
they error (maybe in a trigger "before update/insert"???). Otherwise
I'm obligated to change all SQL statements in my application... I
don't fancy this solution, as you would guess.
Thanks in advance and God bless you,
Joël.