XML load

S

simon

I created a reference in my project to SQLXMLBULKLOADLib.

Then I create an instance:

SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class bulkLoadObj = new
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();

bulkLoadObj.Execute("c:/data.xsd", "c:/data.xml");

and i get the following error message:

'SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class' to interface type
'SQLXMLBULKLOADLib.ISQLXMLBulkLoad'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{1380DD8D-DCB9-4A6E-9D53-EECDDF18DA85}' failed with HRESULT: 0x80004002 (No
such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE))).

What should I do?
Does anybody know the other way to insert xml into database?
Regards,S
 
S

simon

that is the older version. I don't have this version on my computer.

With Visual studio beta2, version 4 came.

regards,
Simon
 
C

CG

See:

Note The SQLXML Bulkload component will not run in a multithreaded
environment ('[MTAThread]' attribute). If so, you receive an
InvalidCastException exception with the additional information:
QueryInterface for interface SQLXMLBULKLOADLib.ISQLXMLBulkLoad failed. The
workaround is to make the object that contains the bulkload object be
single-thread accessible (for example using the [STAThread] attribute as
shown in the sample).
 
C

CMcNear

If I am not mistaken the multithreaded functionality is new to 4.0 at
least that's what I have read. I am having the same problem as the
original post and would really like some type of solution. I have
databases that I need to sync up with 30,000+ records so going row by
row is out of the question. THanks for any help.
See:

Note The SQLXML Bulkload component will not run in a multithreaded
environment ('[MTAThread]' attribute). If so, you receive an
InvalidCastException exception with the additional information:
QueryInterface for interface SQLXMLBULKLOADLib.ISQLXMLBulkLoad failed. The
workaround is to make the object that contains the bulkload object be
single-thread accessible (for example using the [STAThread] attribute as
shown in the sample).

simon said:
that is the older version. I don't have this version on my computer.

With Visual studio beta2, version 4 came.

regards,
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top