Kev
Thu Dec 18 22:32:49 CST 2003
Gidday Val,
I haven't used this method before but I can see value in
the approach... assuming it will work with any valid XML
file of course...
I didn't really think SQL was that efficient when it came
to text manipulation so that's why I was considering the
disconnected recordset/dataset being sent to SQL in one
go. I'll look into your suggestion and see where it leads
me...
Cheers
>-----Original Message-----
>Hi Kev,
>
>If I understand correctly, you need to send all the
changes to the SQL
>Server in one shot, right? If yes, then you could do
this with SQL Server
>2000. You could pass XML into stored procedure as a TEXT
parameter. Then
>inside of SP, you could use sp_xml_preparedocument,
sp_xml_removedocument
>and OPENXML to make actual manipulations with that data.
I have tested it
>some time ago and in most cases you will get at least
two times performance
>improvement
>
>--
>Val Mazur
>Microsoft MVP
>Check Virus Alert, stay updated
>
http://www.microsoft.com/security/incident/blast.asp
>
>
>"Kev" <kev@nospam.com> wrote in message
>news:03ba01c3c5cf$f49b33a0$a601280a@phx.gbl...
>> Hi,
>>
>> I have a database that needs a whole bunch of records
>> added. The data comes from an XML file. I have grabbed
>> the nodes in question, looped through them and I now
want
>> to populate SQL.
>>
>> Obviously I can pass each nodes data to a stored proc
>> which will add to the table but this means lots of
>> network traffic and I am sure it is not as efficient as
>> dumping the data into SQL in one go.
>>
>> So, my question is, how do I create a client side
>> recordset, populate the data into it, and then update
the
>> server, using ADO.Net via VB.Net. This would be more
>> efficient, right?
>>
>> This is probably pretty basic but if someone could show
>> me a sample that dumps several records into a table
(just
>> make one up - I'll be able to follow) it would really
>> help clarify a few things.
>>
>> Thanks to all in advance...
>
>
>.
>