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" <si*********@stud-moderna.si> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
that is the older version. I don't have this version on my computer.
With Visual studio beta2, version 4 came.
regards,
Simon
"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...I believe you are creating the wrong class it should be:
SQLXMLBULKLOADLib.SQLXMLBulkLoad3 bulkLoadObj = new
SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class();
Check out the following link:
http://www.dbazine.com/sql/sql-articles/cook3
HTH
Ollie Riches
"simon" <si*********@stud-moderna.si> wrote in message
news:ua**************@TK2MSFTNGP15.phx.gbl...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