convert .bak file into xml using c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arial
    New Member
    • Sep 2007
    • 109

    convert .bak file into xml using c#

    Hi all,

    I have a sql .bak file which i need to convert into xml file.

    can someone help with this?

    pointing out to some tutorial or some suggetion on how to start?

    Thak you,
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    I hate to point to another site to give you the information, but there's a post here that may help:

    The title is self explanatory. Is there a way of directly doing such kind of importing?


    I don't think you're going to find a way to do this directly - although I'd love to hear if you do. You will need to import the bak file into SQL Server / SQL Server Express and then you'll be able to export your tables to CSV using DTS.

    Comment

    • arial
      New Member
      • Sep 2007
      • 109

      #3
      Convert into degree decimal

      hi all,

      I am stuck with another problem now. I got my xml of my sql database using asp.net c#. but now one of my column hold logitutude value in varchar format like; 117088752, which I had to convert into degree decimal format and export into xml.



      can someone help me on this?


      Thank You,

      Comment

      • balabaster
        Recognized Expert Contributor
        • Mar 2007
        • 798

        #4
        Is that not 117.088752 degrees?

        If it's not, then I have no idea. What datum is that in? UTM11, NAD23, NAD83? I need more info.

        Comment

        • arial
          New Member
          • Sep 2007
          • 109

          #5
          Longitude/ latitude

          Lat = 32788580 and Lon = 117097500

          This is how I have long/latitude saved in my database table.

          I need like this,

          Lat --32.78858º
          Long ---117.0975º .

          I know this conversion but I don't know how can apply this conversion to each of my datarow and then put it into xml.

          So, my xml file put longitude and latitude as shown below.
          Code:
          <Locationinfo>
          <id>1</id>
          <Latitude>32935665</Latitude>
              <Longitude>117243797</Longitude>
          </Locationinfo>
          
          <Locationinfo>
          <id>2</id>
          <Latitude>56935665</Latitude>
              <Longitude>897243797</Longitude>
          </Locationinfo>
          etct...etc.

          And I need this value in xml like,


          Code:
          <Locationinfo>
          <id>1</id>
          <Latitude>32.78858º </Latitude>
              <Longitude>17.78858º </Longitude>
          </Locationinfo>
          
          <Locationinfo>
          <id>2</id>
          <Latitude>56.78858º </Latitude>
              <Longitude>89.78858º </Longitude>
          </Locationinfo>
          etct...etc.
          Thank You.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            As Balabaster has already indicated, you need to know the algorithm you used to create these numbers in order to be able to format them the way you desire.

            If you don't know this algorithm you'll never know if "1170975" is 1.170975, 11.70975, or 117.0975.

            -Frinny

            Comment

            Working...