473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

SQL XML Bulk Load VB Web Service Error

Hi,

I am having a problem with SQLXML Bulk Load inside of a web service ( also
inside of a basic aspx page). I have a WebMethod in a web service that
makes a call to bulk load. This works perfectly on my local test machine (it
has VS 2005, SQL Server 2005 Ent, SQLXML 4.0 Libs and standard XP SP2 IIS)
also for reference the same code works perfectly on a basic one page aspx
file (with code behind). However when this web service or simple page are
moved over to the live server (Windows Server 2003 Standard, IIS,SQLXML 4.0
Libs) the bulk load falls over. Presenting this error

"Unable to cast COM object of type 'SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class'
to interface type 'SQLXMLBULKLOADLib.ISQLXMLBulkLoad4'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{88465BA7-AEEE-49A1-9499-4416287A0160}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE))."

The code is written in VB, and is detailed as follows. I have gone down the
route of exploring threading (which is suggested as an issue that may cause
this in C#) and locking the application to one thread. However this has not
helped. I have even tried installing a full version on SQL Server 2005 on
the web server, still not change. I am
at a loss as to why this is happening as it works flawlessly on my dev
machine. (All files and schemas are well formed as they work on the dev
machine)

Additionally I have changed permissions on IIS and am 99% sure it is not a
permissions issue.

Here is the code for reference; its basic but should do the job.

**WebService Snippet**
Dim FGuid As Guid = Guid.NewGuid

XML_OL.Save(Server.MapPath("App_Data") + "\" + FGuid.ToString + ".xml")

Dim ObjXML As SQLXMLBULKLOADLib.SQLXMLBulkLoad4 = New
SQLXMLBULKLOADLib.SQLXMLBulkLoad4

ObjXML.ConnectionString = SQLConBL

ObjXML.ErrorLogFile = Server.MapPath("App_Data") + "\error.log"

ObjXML.KeepIdentity = False

ObjXML.Execute(Server.MapPath("App_Data") + "\InsertDBContacts.XSD",
Server.MapPath("App_Data") + "\" + FGuid.ToString + ".xml")

File.Delete(Server.MapPath("App_Data") + "\" + FGuid.ToString + ".xml")
**Test One Page Snippet**
Dim ObjXML As SQLXMLBULKLOADLib.SQLXMLBulkLoad4 = New
SQLXMLBULKLOADLib.SQLXMLBulkLoad4

ObjXML.ConnectionString = "Provider=SQLOLEDB;server=xxx;database=xxx;use r
id=xxx;password=xxxx;Trusted_Connection=False;"

ObjXML.ErrorLogFile = "error.log"

ObjXML.KeepIdentity = False

ObjXML.Execute("C:\InsertDBContacts.XSD", "c:\1ib.xml")
Any ideas?
Regards,
Andy.

Apr 24 '06 #1
2 2570
Hi,

I am having exactly same problem as you are. Did you have any luck figuring it out?

Would greatly appreciate it.

Thank you,

Ilya
May 31 '06 #2
Try using Server.CreateObject("SQLXMLBulkLoad.SQLXMLBulkload .4.0")

It worked for me.

May 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: php newbie | last post by:
Hello, I am trying to load a simple tab-delimited data file to SQL Server. I created a format file to go with it, since the data file differs from the destination table in number of columns. ...
1
by: Mike | last post by:
I am trying to use the 'Bulk Insert' command to load a data file into a MS-SQL db. The line I am using is: Bulk Insert SVC_Details From "C:\XFILE.TXT" With (FieldTerminator = ',') I have tried...
3
by: Kiran | last post by:
Hi, I want to back up my data in some table in SQL server and import it back using Bulk Load of SQL server 2K. I can use the following code to backup the data in XML ...
0
by: Kiran | last post by:
Hi, Does some one here know how to trigger export(bulk/non bulk) and use bulk import without having to manually edit the Xsd file before import. BTW I am assuming that XML is the correct choice...
11
by: Ted | last post by:
OK, I tried this: USE Alert_db; BULK INSERT funds FROM 'C:\\data\\myData.dat' WITH (FIELDTERMINATOR='\t', KEEPNULLS, ROWTERMINATOR='\r\n');
3
by: Tim Satterwhite | last post by:
Hi All, I think this is a thorny problem, and I'm hoping you can help. I've not found this exact issue described anywhere yet. I have a stored procedure that calls BULK INSERT on a set of...
0
by: deepakgeorge | last post by:
We are trying to migrate databases and DTS from SQL Server 2000 to 2005. A BULK insert with in a DTS is failing showing the error. Bulk load data conversion error (type mismatch or invalid...
2
by: nano | last post by:
Does sql server have a way to handle errors in a sproc which would allow one to insert rows, ignoring rows which would create a duplicate key violation? I know if one loops one can handle the error...
0
by: NickW | last post by:
I have written a stored procedure that is used to load data into a SQL Server 2000 and 2005 databases from some 40ish different text files. One of the text files is loading all of the rows apart from...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.