TIBCLoader and case dependent identifiers (Dialect 3)

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
petersen
Posts: 13
Joined: Mon 16 Jul 2012 08:56

TIBCLoader and case dependent identifiers (Dialect 3)

Post by petersen » Mon 14 Apr 2014 17:00

(IDBAC 5.2.6 for XE5)

hi

we use your "TIBCLoader" component to copy table contents from one database to another (with the same table-structure) using its "LoadFromDataset" method. therefor we first execute a query (TIBCQuery) like "SELECT * FROM TEST" on the source database and than use something like TIBCLoader.LoadFromDataSet(TIBCQuery) where TIBCLoader is connected to the destination database. everything works like expected!


when it comes to tables with case depending identifiers (table and field names), we run into trouble. the table name could be set with TIBCLoader.TableName := '"Test"' without a problem (all columns are created as expected).

but executing TIBCLoader.LoadFromDataSet(TIBCQuery) will throw an exeption, because it expected a field like "TESTFIELD" for instance - but the actual fieldname is "TestField".

changing the fieldname from TIBCLoader.Columns.Items[FieldIndex].Name := 'TestField' to TIBCLoader.Columns.Items[FieldIndex].Name := '"TestField"' let the TIBCLoader executes without an error -> but no data is copied?!

can you please give us a hint how to handle this situation?!

thank you

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: TIBCLoader and case dependent identifiers (Dialect 3)

Post by PavloP » Tue 15 Apr 2014 12:15

To solve the problem, set the QuoteNames property of the TIBCLoader component to True:

Code: Select all

    IBCLoader1.Options.QuoteNames := True;

petersen
Posts: 13
Joined: Mon 16 Jul 2012 08:56

Re: TIBCLoader and case dependent identifiers (Dialect 3)

Post by petersen » Tue 15 Apr 2014 12:58

... :oops:

yep - that little "trick" solved it! thanks!!!

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: TIBCLoader and case dependent identifiers (Dialect 3)

Post by PavloP » Tue 15 Apr 2014 13:46

It is good to see that the problem has been solved.

Post Reply