Subject Re: [firebird-support] String literals syntax
Author Timothy Madden
On Thu, Aug 28, 2008 at 10:31 PM, Timothy Madden <terminatorul@...>wrote:
On Tue, Aug 26, 2008 at 12:25 AM, Helen Borrie <helebor@...> wrote:
[...]

You may think the parameter names might be too long, but they are all up to
31 characters, and I also tried with shorter names (with less zeroes in
them), and I get the same error pointing on the same digit of 7 :)

If I try to insert a record with a similiar statement, than things work as
expected.

Actually I got this error with an insert statement too:

INSERT INTO
Userfields2
(
"MediaID",
"f0000002791_gre_f_materiaalopbo",
"f0000002792_gre_f_materiaalopbo",
"f0000002793_gre_f_materiaalopbo",
"f0000002794_gre_f_transport#aan",
"f0000002795_gre_f_tno_test#datu"
)

VALUES
(
867579,
NULL,
NULL,
:f0000002793_gre_f_materiaalopbo,
:f0000002794_gre_f_transportaan,
:f0000002795_gre_f_tno_testdatu
);

Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 247
793

The error line and column numbers refer to the statement as written on a
single line.
It points into the name of the first query parameter.

I do not know what can cause it. Thousands of similar statements, that
populated my 'Userfields' and 'Userfields1' tables, which come before
'Userfields2', worked before this one raised an exception.

Looking at the table DDL with IBExpert personal shows the table is created
like this
(although I use an equivalent different statement in my application):

CREATE TABLE USERFIELDS2 (
"MediaID" INTEGER NOT NULL,
"f0000002791_gre_f_materiaalopbo" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002792_gre_f_materiaalopbo" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002793_gre_f_materiaalopbo" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002794_gre_f_transport#aan" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002795_gre_f_tno_test#datu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002796_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002797_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002798_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002799_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002800_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002801_gre_f_tno_test#resu" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002802_gre_f_materiaalgege" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002803_gre_f_roleigenschap" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002804_gre_f_materiaaleige" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002805_gre_f_uitvoering#pe" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002806_gre_f_transport#aan" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002807_gre_f_uitvoering#ge" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002808_gre_f_uitvoering#pr" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002809_gre_f_transport#aan" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002810_gre_f_afwerking#per" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002811_gre_f_uitvoering#aa" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002812_gre_f_uitvoering#aa" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002813_gre_f_uitvoering#ge" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002814_gre_f_roleigenschap" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002815_gre_f_roleigenschap" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002816_gre_f_transport#spa" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002817_gre_f_transport#aan" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002818_gre_f_afmeting#insl" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002819_gre_f_transport#aan" BLOB SUB_TYPE 1 SEGMENT SIZE 80,
"f0000002820_gre_f_uitvoering#bi" BLOB SUB_TYPE 1 SEGMENT SIZE 80
);

ALTER TABLE USERFIELDS2 ADD CONSTRAINT PKUSERFIELDS2 PRIMARY KEY
("MediaID");

GRANT ALL ON USERFIELDS2 TO MEDIABASE WITH GRANT OPTION;



Can anyone please help ?

Thank you,
Timothy Madden


[Non-text portions of this message have been removed]