By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 2,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

convert .bak file into xml using c#

100+
P: 109
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
Share this Question
Share on Google+
5 Replies


balabaster
Expert 100+
P: 797
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

100+
P: 109
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
Expert 100+
P: 797
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

100+
P: 109
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
Expert Mod 5K+
P: 9,731
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.