Page 1 of 1

Info about TMSLoader components

Posted: Tue 15 Apr 2008 07:09
by Sergio Bertolotti
Dear Support,

I'm a register user of SDAC 4.x prof. I use last version 4.35.1.16 with Delphi 2007 prof.

I use your component TMSLoader with SQL 2005 Express edition.
In particulary method LoadFromDataset. I want to import in my table records from another table, in this case MSAccess.

I connect to access via ADO/dbGo all is OK.

The problem is :

-How can I map field from source to destination ? Is it automatically ?

With TCRBatchMove exist a property, MAPS that I can use to maps destination fields over source field, but I can't find this property in TMSLoader....

Can you explain in more details how can I use it ?

Best regards.

Sergio Bertolotti

Posted: Tue 15 Apr 2008 11:52
by Antaeus
The TMSLoader component has no Mappings property like TCRBatchMove has. The LoadFromDataSet method maps fields automatically comparing field names of the source dataset and names from TMSLoader.Columns. If the TMSLoader.Columns property is empty, the method considers that all fields in the source dataset are in the destination table.

Posted: Tue 15 Apr 2008 12:08
by Sergio Bertolotti
Dear Antaeus,

many thank's for your answer.

If I understand correctly, I can import records with TMSLoader only if fields name of Source and Destination are identical.

If not I can't import records... It's correct ?

Why do you think to implement a property MAPS like TCRBatchMove ?

Best regards.

Sergio Bertolotti

Posted: Tue 15 Apr 2008 14:37
by Antaeus
Yes, you are right. Field names of the source dataset and the destination table must be the same. You can try using a query with aliases to change field names in the source dataset:
SELECT Field1 as Field2 FROM table1

We will consider the possibility to support field mapping for the LoadFromDataset method.

Posted: Wed 16 Apr 2008 07:07
by Sergio Bertolotti
Dear Antaeus,

many thanks for your answer.

I hope to see field mapping in the next release of SDAC 4.X.
For me it's more useful with this possibility to map field from origin to destination.

Best regards.

Sergio Bertolotti