Subject Re: [IBO] IB_Import and reserved words
Author Helen Borrie
At 01:59 PM 12/12/2005 +0000, you wrote:
>Helen, hi there
>Thank you for help, much appreciated!!!
>I have tried that, but still no luck...
> (defining the field list in the FieldList property, no luck.
>I have traced though Ib_Import, where it builds up the SQL, even
>hard-coded the quotes ("default"), but where it crashes is where it calls
> DSql.Prepare;
>The sql is:
> insert into TableX (code,description,"default",country_id)
> values (:code,:description,:default,:country_id)
>-SQL error code -206, Column unknown, default, At line 1 column 28

Use isql to get an exact column list for TableX. With IB_SQL you can't
tell whether the table has been defined with quoted identifiers or not.

The case of the column definition MATTERS if a quoted identifier is
used. So if isql shows you that the column name is "DEFAULT" or "Default"
(or whatever) then you must use the entire thing case-sensitively.

The advice about the field list was in reference to the source file, not
the destination table.

I would also suggest that you use a different name for the parameter which
you are calling :default. It can be anything you like, as long as the word
is not a Delphi or Firebird keyword.