Error while duplicate record when field name starting with numeric

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Theprasit
Posts: 15
Joined: Fri 17 Nov 2006 04:01

Error while duplicate record when field name starting with numeric

Post by Theprasit » Tue 13 Feb 2007 05:13

I got an SQL error -104 Token Unknow at line x char xx 404.

My Code are:-

procedure CopyButtonClick(Sender: TObject; AButtonIndex: Integer);
var
aField : Variant ;
i : Integer ;
begin
with qryWht do
begin
// create a variant Array
aField:= VarArrayCreate([0,Fieldcount-1],VarVariant);
// read values into the array
for i:= 1 to (Fieldcount-1) do
aField:= fields.Value ;
Append;
// put array values into new the record
for i:= 1 to (Fieldcount-1) do
fields.Value:= aField;
Post;
end;
end;

The cause of this came from one of my fieldname starting with 404 and after correct it, an error gone.

This will not happen for normal update (Insert, change data value, Post).

I used IBDAC 1.10.13 with D7

BR.

P.S.

Is it possible to have a new build version in ZIP form. It's easier to replace the current one without uninstall. (That's why I still used 1.10.13)

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 13 Feb 2007 09:51

>I got an SQL error -104 Token Unknow at line x char xx 404.
The reason of this problem is field names starting with a digit - InterBase/Firebird doesn't allow use unquoted identifiers that start with a digit.
To resolve this problem you should set TIBCQuery.Options.QuoteNames to True.

>Is it possible to have a new build version in ZIP form. It's easier to replace the current one without uninstall.
We do not have such distribution versions. In IBDAC 2 you will have /Force command line installation option to override previous install without uninstalling. The current IBDAC version requires you to uninstall the previous version.

Theprasit
Posts: 15
Joined: Fri 17 Nov 2006 04:01

Post by Theprasit » Wed 14 Feb 2007 05:51

Thank you for you information.

I'm waiting for a full IBDAC V.2 soon.

BR,

Post Reply