TIBCLoader and case dependent identifiers (Dialect 3)
Posted: 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
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