Solved

cannot create activex component SQLxmlbulkload

Posted on 2010-09-10
4
672 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

810 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