SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Importing XML Files Into SQL Server


Importing XML Files Into SQL Server

Author
Message
adman3613
adman3613
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 76
another issue just came up ....

i have come across some xml files that have the following:
-
- <Circuit Name="13B-10" Adrs="710" G="13B" Ofst="1" Micro="0" SvrID="0" ProcID="727842327" PrgIndx="641" PrgStp="2" Mode="7" A="37.91" StpAH="96.6" V="18.7" Tmp="32.0" StpT="152" RunTime="184" Comm="0" Tick="4095" Pwr="True" MainC="" ES="100" TLeft="392.0582" AccumAH="113.616" -Alarm="0" ProcStart="2/16/2010 9:17:34 PM" ProcEnd="12:00:00 AM" ProcInfo="" -ProcFree="12:00:00 AM" -TIA="0" TIV="0" TIT="0" Cyc="0" AT="0" CR="0" TCR="0">
- <Prg Name="269PMPG" Indx="641" AcummAH="False">
- <Stp ID="1" Cod="7" N2="34.1" T12="17"></Stp>
- <Stp ID="2" Cod="7" N2="40" T12="221"></Stp>
- <Stp ID="3" Cod="7" N2="34.1" T12="40.9"></Stp>
- <Stp ID="4" Cod="7" N2="25.5" T12="52.6"></Stp>
- <Ext>
-
- </Ext>
- </Prg>
- <UData></UData>
- </Circuit>
-</Circuits> <Stp ID="2" Cod="7" N2="40" T12="221"></Stp>
- <Stp ID="3" Cod="7" N2="34.1" T12="40.9"></Stp>
- <Stp ID="4" Cod="7" N2="25.5" T12="52.6"></Stp>
- <Ext>
-
- </Ext>
- </Prg>
- <UData></UData>
- </Circuit>
-</Circuits>1" Cod="7" N2="40" T12="527.3"></Stp>
- <Ext>
-
- </Ext>
- </Prg>
- <UData></UData>
- </Circuit>
-</Circuits>ircuits>ts>s>ts>cuits>"></Stp>
- <Ext>
-
- </Ext>
- </Prg>
- <UData></UData>
- </Circuit>
-</Circuits>


don't mind the "-" as this what i did to post the text in the forum. The first element of -<Circuit> is fine as you can see but below you can see where the file has gotten corrupted and there is a bunch of -</Circuits> ... some are even incomplete within the < identifiers. I would like to truance the bulk load at the end of the good data. This is giving me a sql server first exception error.
ani.swath
ani.swath
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 0
How to save xml file data into sql server database by using vb.net
emzi19
emzi19
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 5
Hi there,

I tried using this article but i get an object required error on the line

Set wsh = WScript.CreateObject("WScript.Shell") ?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search