?
Solved

exporting sql data into xml

Posted on 2006-04-27
10
Medium Priority
?
561 Views
Last Modified: 2008-02-01
Hi alll,

i am trying to e xport some data in sql server 2000. I tried using this method described in this article http://www.perfectxml.com/Articles/XML/ExportSQLXML.asp

 by using the sp_makewebtask but i get an error like this:

Could not load the DLL xpweb90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).


the problem might be because i am testing it using the sql server 2005 but i was wondering if that's the easiest way to do or the  way to do it. Thank you in advance,

Linda
0
Comment
Question by:lytung818
  • 5
  • 2
  • 2
  • +1
10 Comments
 

Author Comment

by:lytung818
ID: 16557790
did i mention that iw anted to export data in XML?
0
 
LVL 10

Expert Comment

by:StephenCairns
ID: 16558090
You can export it with a DTS package
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16558655
StephenCairns,

Not sure if you noticed but the questioner is "testing it using the sql server 2005"
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:lytung818
ID: 16558708
so if i am working on a sql server 2000 db i should be able to export it in dts?

Well what i am trying to do is write an update trigger that would export the qty changed into an xml file, which will later on be automatically uploaded to our new ERP system using another program to keep track of the inventory.

what are your suggestions?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16558731
The way that I would do it is use FOR XML to export the data as an Xml document and then use a front-end app such as .NET to save it to a file.
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16559008
U can make use of xp_cmdShell and ForXMl in SQL 2000


Exec master.dbo.xp_cmdshell 'bcp "Select XMLText From ' + db_name() + '..urTable" queryout c:\test.xml -c -S' + @@ServerName + ' -T'
0
 

Author Comment

by:lytung818
ID: 16559391
Thank you for your suggestion, anneshattngal

I will have to try it out


is there any requirements to use this? install something or assign rights?
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 16559423

lytung818,
> is there any requirements to use this?
Not, nothing special u need to install
0
 

Author Comment

by:lytung818
ID: 16563522
i tried this, i get a syntax error


Exec master.dbo.xp_cmdshell 'bcp

"SELECT phone, address, city' + dbo.pubs + 'dbo.authors" queryout c:\test.xml -c -S' + '@@Comp-3187\SQLEXPRESS' + ' -T'

 
0
 

Author Comment

by:lytung818
ID: 16580962
i got it to work thank you
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

862 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