Solved

cannot create activex component SQLxmlbulkload

Posted on 2010-09-10
4
680 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

730 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