SQL to XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cfyam

    #1

    SQL to XML

    How can I save data(query from SQL Server 2000) to XML file? If I don't do
    that with SqlDataAdapter to load data.


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: SQL to XML

    Hi,

    I see various options here

    1) Install SQLXML and XMl data directly from the SQL Server
    2) Use SqlDataReader, populate a dataset in a loop and then save the dataset
    as XML
    3) Use SqlDataReader, read data in a loop and save it to XML manually with
    XmlWriter

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "cfyam" <cfyam@mail.apo l.com.tw.w> wrote in message
    news:u9F9B1UiDH A.2452@TK2MSFTN GP10.phx.gbl...[color=blue]
    > How can I save data(query from SQL Server 2000) to XML file? If I don't do
    > that with SqlDataAdapter to load data.
    >
    >[/color]

    Comment

    • Michael Earls

      #3
      Re: SQL to XML

      +1 to #3

      Michael Earls

      "Dmitriy Lapshin [C# / .NET MVP]" <x-code@no-spam-please.hotpop.c om> wrote
      in message news:eWTtXNZiDH A.2592@tk2msftn gp13.phx.gbl...[color=blue]
      > Hi,
      >
      > I see various options here
      >
      > 1) Install SQLXML and XMl data directly from the SQL Server
      > 2) Use SqlDataReader, populate a dataset in a loop and then save the[/color]
      dataset[color=blue]
      > as XML
      > 3) Use SqlDataReader, read data in a loop and save it to XML manually with
      > XmlWriter
      >
      > --
      > Dmitriy Lapshin [C# / .NET MVP]
      > X-Unity Test Studio
      > http://x-unity.miik.com.ua/teststudio.aspx
      > Bring the power of unit testing to VS .NET IDE
      >
      > "cfyam" <cfyam@mail.apo l.com.tw.w> wrote in message
      > news:u9F9B1UiDH A.2452@TK2MSFTN GP10.phx.gbl...[color=green]
      > > How can I save data(query from SQL Server 2000) to XML file? If I don't[/color][/color]
      do[color=blue][color=green]
      > > that with SqlDataAdapter to load data.
      > >
      > >[/color]
      >[/color]


      Comment

      Working...