SQL and XML...

  • Thread starter Raphaël Désalbres
  • 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
 
S

Sreejumon[MVP]

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
 
M

M Willis

SqlCommand sqlCmd = new SqlCommand("Procedurename",
sqlConnectionObject);
XmlReader reader = sqlCmd.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(reader);
xmlDoc.Save(@"c:\xmlFile.xml");
 
R

Raphaël Désalbres

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");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top