Solved

cannot create activex component SQLxmlbulkload

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

627 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