Subject | Edit/Update problems when SQL contains quotes? |
---|---|
Author | Lukas Zeller |
Post date | 2001-09-10T08:51:51Z |
Hello all,
(sorry for eventual reposting, but it seems that my previous
attempt hasn't reached the list at all)
I am porting an IBO 3.6 / D5 app to IBO4 / D6. Almost everything
worked smooth, but I have one problem which is caused by
different behaviour in IBO 4 vs IBO 3.6 and it seems to me
it might be a bug.
In most of my queries I have set all table names in double
quotes:
SELECT
PERSKEY,
NAME
FROM
"ZL_PERS"
The quotes are not really needed now (all table names are uppercase
and no reserved words used)
Now, any TIB_Query using the SQL above fails to be editable.
Obviously, the new IBO4 mechanism that parses SQL and produces
UPDATE and INSERT statements gets somehow off track by quoted
table names. It used to work in IBO 3.6.
SELECT
PERSKEY,
NAME
FROM
ZL_PERS
works as expected.
I have also SQL with quoted field names, they still work ok.
No code is needed to test this; simply double-click a TIB_Query
that used to be editable, and add quotes around a table name.
Then change to the "Data" tab -> data cannot be edited any more.
Is this intended behaviour (for some reason I don't understand
yet) or a bug? If it is the former, I hope someone would be
so kind to explain so I can fix my SQL statements knowing why
rather than just removing all the quotes "just because it works
that way". Thanks!
Regards,
--
Lukas Zeller (luz@...)
-
Synthesis AG, Sustainable Software Concepts
info@..., http://www.synthesis.ch
(sorry for eventual reposting, but it seems that my previous
attempt hasn't reached the list at all)
I am porting an IBO 3.6 / D5 app to IBO4 / D6. Almost everything
worked smooth, but I have one problem which is caused by
different behaviour in IBO 4 vs IBO 3.6 and it seems to me
it might be a bug.
In most of my queries I have set all table names in double
quotes:
SELECT
PERSKEY,
NAME
FROM
"ZL_PERS"
The quotes are not really needed now (all table names are uppercase
and no reserved words used)
Now, any TIB_Query using the SQL above fails to be editable.
Obviously, the new IBO4 mechanism that parses SQL and produces
UPDATE and INSERT statements gets somehow off track by quoted
table names. It used to work in IBO 3.6.
SELECT
PERSKEY,
NAME
FROM
ZL_PERS
works as expected.
I have also SQL with quoted field names, they still work ok.
No code is needed to test this; simply double-click a TIB_Query
that used to be editable, and add quotes around a table name.
Then change to the "Data" tab -> data cannot be edited any more.
Is this intended behaviour (for some reason I don't understand
yet) or a bug? If it is the former, I hope someone would be
so kind to explain so I can fix my SQL statements knowing why
rather than just removing all the quotes "just because it works
that way". Thanks!
Regards,
--
Lukas Zeller (luz@...)
-
Synthesis AG, Sustainable Software Concepts
info@..., http://www.synthesis.ch