Link to home
Start Free TrialLog in
Avatar of Simon Cripps
Simon CrippsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

cannot create activex component SQLxmlbulkload

Hi,
I'm just moving a new console program( created in visual basic 2010 express) from my PC to the server. Testing the compiled version on the PC is fine but on the server I get the message
Unhandled Exception: System.Exception: Cannot create ActiveX component.
the line in the program that it points to is

objbl = CreateObject("SQLxmlbulkload.SQLxmlbulkload")

I realise that when you create the program you need to add reference to Interop.SQLXMLBULKLOADLib.dll, which I did in the development region. However I did not see SQLXMLBULKLOADLib.dll appear in a bin directory, which is what happened when I created the program in asp.net.
Any suggestions to the issue. Could it be that I need to place a copy of Interop.SQLXMLBULKLOADLib.dll somewhere onto the server or do I put it into a bin directory in my VB project befor building. or is it something else.
Cheers in advance
Avatar of packratt_jk
packratt_jk
Flag of United States of America image

createobject doesn't invoke the interop, it creates the com control directly.  You want to do something like:

SqlXmlBulkLoad.SQLxmlbulkload objbl = new SqlXmlBulkLoad.SQLxmlbulkload();
ASKER CERTIFIED SOLUTION
Avatar of packratt_jk
packratt_jk
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Simon Cripps

ASKER

Manythanks, you certainly know your stuff
glad to help.  All com/activex stuff is registered like that (regsrv32 just adds those registry keys).