Page 1 of 1

TUniLoader - how to not load a specific column from source dataset

Posted: Fri 09 Dec 2016 10:27
by ertank
Hi,

When using TUniLoader, is it possible to not to load a column in destination table?

Situation is, I am displaying some additional values for user convenience. However, these additional columns is not to be imported in my final table.

Thanks.

Re: TUniLoader - how to not load a specific column from source dataset

Posted: Wed 14 Dec 2016 12:01
by azyk
To solve the problem you can use fields mapping to set a field name from dataset-source to each TUniLoader(the TDAColumn.Name property) column. For example:

Code: Select all

  UniLoader.TableName := SQLServerTableName;
  UniLoader.CreateColumns;
  UniLoader.Columns[0].Name := 'Column1_source';
  UniLoader.Columns[1].Name := 'Column3_source';
  UniLoader.Columns[2].Name := 'Column5_source';
//  ...
  UniLoader.LoadFromDataSet(SQLiteQuery);