SQL and XML...

  • Thread starter Thread starter Raphaël Désalbres
  • Start date Start date
R

Raphaël Désalbres

Hello, everyone,

I would like to know if it is possible to execute SQL queries into an XML
file, if so, could you send me an example....

Thanks,

Raphaël Désalbres
 
Hi Rafel,

I think you are looking for SQLXML.SQLXML enables XML
support for your SQL Server Database. It allows developers
to bridge the gap between XML and relational data. You can
create XML View of your existing relational data and work
with it as if it was an XML file. SQLXML allows you to:
·Build Web Services with SQL Server 2000
·Build websites to publish data from SQL Server
·Query relational database with XPath
·Update relational data as if it was XML
·Load XML into SQL Server
·Query SQL Server via URLs, OLEDB/ADO or .NET Managed
Classes

Please refer the following link for more details.
http://www.microsoft.com/downloads/details.aspx?
FamilyID=4023deea-f179-45de-b41d-
84e4ff655a3b&DisplayLang=en

regards
Sreejumon[MVP]
DOTNET makes IT happen
 
SqlCommand sqlCmd = new SqlCommand("Procedurename",
sqlConnectionObject);
XmlReader reader = sqlCmd.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(reader);
xmlDoc.Save(@"c:\xmlFile.xml");
 
Hello,

I appreciate very much your help but I would actually need the VB code not
C#...

Best wishes,

Raphaël Désalbres

"M Willis" <[email protected]> escreveu na mensagem
SqlCommand sqlCmd = new SqlCommand("Procedurename",
sqlConnectionObject);
XmlReader reader = sqlCmd.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(reader);
xmlDoc.Save(@"c:\xmlFile.xml");
 
Back
Top