Subject Re: After inserting 4683 rows infamous "Cannot transliterate ..." error always
Author Stefan Renzewitz
--- In, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
> Do you mean you are running sql script ?
> Have you tried it with standard isql ?
> Does it contain SET NAMES statement ?

I have been using the stored procedure (see below) to insert the rows.
This weekend I was away and it looks like the break was just the best
thing to do. I had a fresh look at the whole thing and found a pretty
stupid mistake. Unfortunately the error message made me look at the
wrong place.

> > With IB Expert I can open the table and there is nothing special
to see.
> >
> > The stored procedure looks like this:
> >
> > iswhitetomove char(1),
> > huffmanfen_input varchar(37))
> > returns (
> > position_id integer)
> > as
> > begin
> > SELECT "Position"."HuffmanFen"
> > FROM "Position"
> > WHERE "Position"."HuffmanFen" = :huffmanfen_input INTO :position_id;
> > if (position_id is null) then begin position_id =
> > gen_id("sq_Position",1); INSERT INTO "Position" (OID,
> > "Position"."HuffmanFen",
> > "Position"."IsWhiteToMove") VALUES (:position_id, :huffmanfen_input,
> > :iswhitetomove); end suspend; end^
> >
> > ==========
> > It fails at the line "WHERE" where I try to query for :huffmanfen. But
> > only after inserting 4683 rows.
> ??? What does it mean "It fails at the line WHERE" ? Do you use some
emulator ?

No, I found this out by try & error. I just commented some parts of
the stored procedure till it did pass again. However, here lies the
mistake. I select Position.HuffmanFen instead of Position.Oid. So I
have been setting position_ID = Position.HuffmanFen. In other words I
have been accidently assigning a string entry to an integer field. The
weird thing is that Firebird would let me run this procedure for
>4.000 entries and only started to complain later in random ways (at
least it looked to me like that).

The error message made me believe I have a problem with my Unicode
string and didn't let me see the tree in the forest which was much
easier to solve. Now it works.

Thanks for your answer and taking the time. Sorry that it was such a
stupid mistake though.