Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
badua
Starting Member
8 Posts |
Posted - 2007-04-03 : 12:14:06
|
Hi you all,I have an XML file as the following:<?xml version="1.0" standalone="yes"?><DataSet> <xs:schema id="DataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="DataSet" msdata:IsDataSet="true" msdata:Locale="vi-VN"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="STS_ORDERS"> <xs:complexType> <xs:sequence> <xs:element name="ORDER_NO" type="xs:string" minOccurs="0" /> <xs:element name="ORDER_DATE" type="xs:dateTime" minOccurs="0" /> <xs:element name="ORDER_TIME" type="xs:string" minOccurs="0" /> <xs:element name="MEMBER_ID" type="xs:decimal" minOccurs="0" /> <xs:element name="ORDER_TYPE" type="xs:decimal" minOccurs="0" /> <xs:element name="PRIORITY" type="xs:decimal" minOccurs="0" /> <xs:element name="ORDER_QTTY" type="xs:decimal" minOccurs="0" /> <xs:element name="ORDER_PRICE" type="xs:decimal" minOccurs="0" /> <xs:element name="STATUS" type="xs:decimal" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <STS_ORDERS> <ORDER_NO>210307B006004</ORDER_NO> <ORDER_DATE>2007-03-21T00:00:00.0000000+07:00</ORDER_DATE> <ORDER_TIME>09:48:11:000</ORDER_TIME> <MEMBER_ID>342</MEMBER_ID> <ORDER_TYPE>1</ORDER_TYPE> <PRIORITY>1</PRIORITY> <ORDER_QTTY>1500</ORDER_QTTY> <ORDER_PRICE>80000</ORDER_PRICE> <STATUS>1</STATUS> </STS_ORDERS> <STS_ORDERS> <ORDER_NO>210307B006005</ORDER_NO> <ORDER_DATE>2007-03-21T00:00:00.0000000+07:00</ORDER_DATE> <ORDER_TIME>09:48:11:000</ORDER_TIME> <MEMBER_ID>45</MEMBER_ID> <ORDER_TYPE>1</ORDER_TYPE> <PRIORITY>1</PRIORITY> <ORDER_QTTY>400</ORDER_QTTY> <ORDER_PRICE>86000</ORDER_PRICE> <STATUS>1</STATUS> </STS_ORDERS></DataSet> and I have to read this file into a SQL 2000 Server table every 10 seconds. At the moment, I use an Windows form application in which a Timer executes objDataSet.ReadXml, then executes Insert into the table every 10 seconds.The performance is not good because the XML file size is rather big (about 5MB). A member suggested that I should use 'bulk import XML documents into a SQL Server database' but I has yet to know how to do that with my above XML file (which even contains <xs:schema>).Anyone helps me out |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-04-03 : 13:05:20
|
Take a look herehttp://www.perfectxml.com/articles/xml/importxmlsql.asp |
|
|
badua
Starting Member
8 Posts |
Posted - 2007-04-04 : 23:51:47
|
I has not found the solution for my XML files yet. The XML files in the link you gave seem be structured simple, and different from mine. Plz take a look inside my circumstance! |
|
|
|
|
|