MSLoader - LoadFromDataSet

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gpnunes
Posts: 7
Joined: Fri 17 Aug 2007 14:08

MSLoader - LoadFromDataSet

Post by gpnunes » Wed 26 Sep 2007 20:04

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Sep 2007 09:10

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.

gpnunes
Posts: 7
Joined: Fri 17 Aug 2007 14:08

Post by gpnunes » Thu 27 Sep 2007 16:10

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 28 Sep 2007 09:07

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.

gpnunes
Posts: 7
Joined: Fri 17 Aug 2007 14:08

Post by gpnunes » Mon 01 Oct 2007 15:03

Is there another way to copy the data from a dataset to SQL Compact Edition Table?

Thanks
Gustavo

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 02 Oct 2007 07:28

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.

Post Reply