exporting sql data into xml

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
lytung818Asked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:

lytung818,
> is there any requirements to use this?
Not, nothing special u need to install
0
 
lytung818Author Commented:
did i mention that iw anted to export data in XML?
0
 
StephenCairnsCommented:
You can export it with a DTS package
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Anthony PerkinsCommented:
StephenCairns,

Not sure if you noticed but the questioner is "testing it using the sql server 2005"
0
 
lytung818Author Commented:
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
 
Anthony PerkinsCommented:
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
 
Aneesh RetnakaranDatabase AdministratorCommented:
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
 
lytung818Author Commented:
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
 
lytung818Author Commented:
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
 
lytung818Author Commented:
i got it to work thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.