Subject Re: [IBO] IB_Import and reserved words
Author SUPER Safra - CPD
Quero sair do grupo como faco
----- Original Message -----
From: Helen Borrie
To: IBObjects@yahoogroups.com
Sent: Friday, December 09, 2005 8:29 PM
Subject: Re: [IBO] IB_Import and reserved words


At 07:16 PM 9/12/2005 +0000, you wrote:
>Hi there
>
>I am using IB_Import, but am having trouble as of the columns names are
>reserved words.
>Now, normally I simply quote them and IB-Objects understands them
>fine, but
>with IB_Import
>doesn't seem to work?
>
>Eg: CODE VARCHAR(5) NOT NULL,
> DESCRIPTION VARCHAR(15),
> "DEFAULT" CHAR(1),
>
>I am including the column names in the first line of the text file to
>import, and
>have tried using quotes there, but still same problem...

Double-quotes have a special (non Fb/IB) significance in text data
files. AFAIK, it should be enough to put quotes around the offending field
name in your FieldList property.

If that still excepts, try removing the header line altogether and defining
your own list of (legal) field names in the FieldList property. They can
be Huey, Dewey and Louie or whatever you like, as long as they are in the
right order.

That said, its impossible to tell from your problem description whether you
are getting trouble because of the source record definition or your
destination table definition. You don't actually say what exception you
are getting, either.

If the latter - that the insert or update statement being constructed by
the component causes an exception - it could be one of the following:

1) Your database is dialect 1. In that case, a quoted identifier won't be
legal.

2) The possibility that Delphi has an extra problem with a **column name**
of "DEFAULT" at some level of parsing, since this is also a keyword in
Delphi and Delphi doesn't have any special syntax for making illegal
keyword use legal.

Helen






___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !



------------------------------------------------------------------------------
YAHOO! GROUPS LINKS

a.. Visit your group "IBObjects" on the web.

b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------------------------------------------------------------



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