Page 1 of 1

MSLoader - LoadFromDataSet

Posted: Wed 26 Sep 2007 20:04
by gpnunes
Hi Guys,

I'm trying to load a xml file to VirtualTable, and use MSLoader and LoadFromDataset Method to copy data to physical table.
Below my code:

MSConnection.ConnectString := 'Provider=MICROSOFT.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=""';
MSConnection.Database := 'MediaControl.sdf';
MSConnection.Open;

VirtualTable1.LoadFromFile('c:\audiomedia\small-teste.XML');

MSLoader1.Connection := MSConnection;
MSLoader1.TableName := 'MediaTable';
MSLoader1.LoadFromDataSet(VirtualTable1);

When I execute the "LoadFromDataSet" Method I get the message: "No such interface supported".

What does it mean? I'm doing anything wrong?
Thanks
Gustavo

Posted: Thu 27 Sep 2007 09:10
by Antaeus
It looks like the provider you have installed does not support the IFastLoad interface which is used by TMSLoader. Try to download and install the last version of the SQL Native Client provider.

Posted: Thu 27 Sep 2007 16:10
by gpnunes
Hi, Antaeus, I downloaded Microsoft SQL Server Native Client - X86 Package (sqlncli.msi) - 3511 KB - and the problem continues.

Could be because the SQL COMPACT, msLoader works with it?

After the "No such interface" message, when I try to close my application I get the error message: "Exception EAssertionFailed in module....
Assertion Failure (d:\projects\delphi\sdac\source\msloader.pas, line 318)"

What I didn't undestand is: There isn't this path in my computer, I don't have de sources of SDAC, and also there isn't drive "d".

Thanks
Gustavo.

Posted: Fri 28 Sep 2007 09:07
by Antaeus
The SQL Server Compact Edition also does not support the IFastLoad interface, so it is not possible to use the TMSLoader component with SQL Server Compact Edition.
We will fix the problem with Assertion Failure in the nearest builds of SDAC.

Posted: Mon 01 Oct 2007 15:03
by gpnunes
Is there another way to copy the data from a dataset to SQL Compact Edition Table?

Thanks
Gustavo

Posted: Tue 02 Oct 2007 07:28
by Antaeus
You can use the TCRBatchMove component. Just connect it to a source dataset, and to a destination dataset, choose the appropriate value for Mode and other parameters, if necessary, and execute it.