Solved

cannot create activex component SQLxmlbulkload

Posted on 2010-09-10
4
667 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:Simon Cripps
  • 3
4 Comments
 
LVL 3

Expert Comment

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

SqlXmlBulkLoad.SQLxmlbulkload objbl = new SqlXmlBulkLoad.SQLxmlbulkload();
0
 
LVL 3

Accepted Solution

by:
packratt_jk earned 500 total points
ID: 33648122
still though, it sounds like you don't have the com object installed on the server to begin with.  Search for "SQLxmlbulkload" in the registry, in HKEY_CLASSES_ROOT.  that will tell you if it's installed or not.

On your development machine, do the same.  there will be a key under it named 'CLSID".  take the default value (it will be a GUID) and search for it  (it will be in HKEY_CLASSES_ROOT\CLSID\).  In there will be a key named InprocServer32 with a value that shows what file it is pointing at.  The path might give you an idea of which software package the control is a part of.
0
 

Author Closing Comment

by:Simon Cripps
ID: 33648815
Manythanks, you certainly know your stuff
0
 
LVL 3

Expert Comment

by:packratt_jk
ID: 33648940
glad to help.  All com/activex stuff is registered like that (regsrv32 just adds those registry keys).
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now