Click to See Complete Forum and Search --> : for XML AUTO USING DB-LIBRARY


gayathri_gopi
January 13th, 2004, 04:38 AM
i have a DB library connection in C++ which retrieves rows from SQL-Server.
The SQL query is just select * from ClientMaster.

1.I need the query to return datas in XML format, using for XML auto.
While using the query,
dbcmd(select * from ClientMaster for xml auto)
the next statement,
dbsqlexec(dbproc),
fails for me.
Is there any techniques to execute the above command?
Please help me out.

2.I also need to store the result of the above query in xml format ,to a xml file.
just copy the result XML to a file.
How will i be able to access the result of the query or
How will store the result in a string which contains the result of the query in xml

format.

eg.

if the query returns
<customer id=1 name="gggg" />
if need to save this in a .xml file.
How will i do it in DB-library.
Please help me to do it.