473,790 Members | 2,561 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 'SQLXMLBULKLOAD Lib.SQLXMLBulkL oad4Class'
to interface type 'SQLXMLBULKLOAD Lib.ISQLXMLBulk Load4'. 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(Ser ver.MapPath("Ap p_Data") + "\" + FGuid.ToString + ".xml")

Dim ObjXML As SQLXMLBULKLOADL ib.SQLXMLBulkLo ad4 = New
SQLXMLBULKLOADL ib.SQLXMLBulkLo ad4

ObjXML.Connecti onString = SQLConBL

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

ObjXML.KeepIden tity = False

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

File.Delete(Ser ver.MapPath("Ap p_Data") + "\" + FGuid.ToString + ".xml")
**Test One Page Snippet**
Dim ObjXML As SQLXMLBULKLOADL ib.SQLXMLBulkLo ad4 = New
SQLXMLBULKLOADL ib.SQLXMLBulkLo ad4

ObjXML.Connecti onString = "Provider=SQLOL EDB;server=xxx; database=xxx;us er
id=xxx;password =xxxx;Trusted_C onnection=False ;"

ObjXML.ErrorLog File = "error.log"

ObjXML.KeepIden tity = False

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

Apr 24 '06 #1
2 2597
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.CreateOb ject("SQLXMLBul kLoad.SQLXMLBul kload.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
16508
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. When I execute the query, I get an error saying that only sysadmin or bulkadmin roles are allowed to use the BULK INSERT statement. So, I proceeded with the Enterprise Manager to grant myself those roles. However, I could not find sysadmin or...
1
12869
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 the file name with " around it and with ' around it and both the " and ', but every time the Query Analyzer comes back with the following error: ---Begin Error Msg---
3
8094
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 dataset.WriteXml(@"C:\Data.xml"); dataset.WriteXmlSchema(@"C:\Schema1.xml");
0
1507
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 as I want to save these data in my VSS for future after export. ====================================== My prev Post:
11
28360
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
3463
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 text files. These files are FTP'd from a legacy system (a mainframe running MVS). Sometimes, the process steps on iteslf, whereby the bulk insert is attempted on a file whose FTP is still in progress; it's not fully written to disk on the SQL box...
0
2588
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 character for the specified codepage) BULK insert is reading a text file from the local system where the dates are in the format mm/dd/yyyy.
2
15123
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 on a row by row basis. But is there a way to skip the loop and do it as a bulk insert? It's easy to do in Access, but I'm curious to know if SQL Server proper can handle like this. I am guessing that a looping operation would be slower to...
0
2615
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 the last one. No error message is issued when this happens. The command I am using to load the data is as follows: BULK INSERT BasicDataT FROM 'E:\Temp\Food GNRLv3\BasicData.txt' WITH ( FORMATFILE =...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.