Solved

cannot create activex component SQLxmlbulkload

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

896 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

15 Experts available now in Live!

Get 1:1 Help Now