472,125 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

convert .bak file into xml using c#

109 100+
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,
Nov 21 '08 #1
5 9695
balabaster
797 Expert 512MB
I hate to point to another site to give you the information, but there's a post here that may help:

http://stackoverflow.com/questions/156279?sort=oldest

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.
Nov 21 '08 #2
arial
109 100+
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,
Dec 3 '08 #3
balabaster
797 Expert 512MB
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.
Dec 4 '08 #4
arial
109 100+
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.
Expand|Select|Wrap|Line Numbers
  1. <Locationinfo>
  2. <id>1</id>
  3. <Latitude>32935665</Latitude>
  4.     <Longitude>117243797</Longitude>
  5. </Locationinfo>
  6.  
  7. <Locationinfo>
  8. <id>2</id>
  9. <Latitude>56935665</Latitude>
  10.     <Longitude>897243797</Longitude>
  11. </Locationinfo>
  12. etct...etc.
  13.  

And I need this value in xml like,


Expand|Select|Wrap|Line Numbers
  1. <Locationinfo>
  2. <id>1</id>
  3. <Latitude>32.78858º </Latitude>
  4.     <Longitude>17.78858º </Longitude>
  5. </Locationinfo>
  6.  
  7. <Locationinfo>
  8. <id>2</id>
  9. <Latitude>56.78858º </Latitude>
  10.     <Longitude>89.78858º </Longitude>
  11. </Locationinfo>
  12. etct...etc.
  13.  
Thank You.
Dec 4 '08 #5
Frinavale
9,735 Expert Mod 8TB
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
Dec 4 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by PenguinPig | last post: by
5 posts views Thread by bbb | last post: by
6 posts views Thread by tshad | last post: by
23 posts views Thread by Carl K | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.