|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sending XML From .Net To SQLServerHi people I have a question about that:
Nowadays I'm using the Update Method from DataAdapter but i figure out that it generate multiples roundtrip to my dbserver so i want to use XML to send all my data to SQLServer and process that in just one travel :P That XML have all my rows that are Added, Modified and Deleted on my Win32Application....So it's possible to process if i send in XML???... I saw that in SQLServer exist OPENXML function to accomplish that but i don't know how to use it.. Please can you help me!!!! Regards Yes it is possible. Look at SqlXml and UpdateGrams.
- Sahil Malik [MVP] http://codebetter.com/blogs/sahil.malik/ Show quoteHide quote "Johny" <Jo***@discussions.microsoft.com> wrote in message news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... > Hi people I have a question about that: > > Nowadays I'm using the Update Method from DataAdapter but i figure out that > it generate multiples roundtrip to my dbserver so i want to use XML to send > all my data to SQLServer and process that in just one travel :P > > That XML have all my rows that are Added, Modified and Deleted on my > Win32Application....So it's possible to process if i send in XML???... > > I saw that in SQLServer exist OPENXML function to accomplish that but i > don't know how to use it.. > > Please can you help me!!!! > > Regards Also check my KB article with an example how you could pass XML into SQL
Server stored procedure http://support.microsoft.com/default.aspx?scid=kb;en-us;555266 Show quoteHide quote "Sahil Malik [MVP]" <contactmethrumyblog@nospam.com> wrote in message news:envO8wiOFHA.2520@tk2msftngp13.phx.gbl... > Yes it is possible. Look at SqlXml and UpdateGrams. > > - Sahil Malik [MVP] > http://codebetter.com/blogs/sahil.malik/ > > > > "Johny" <Jo***@discussions.microsoft.com> wrote in message > news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... >> Hi people I have a question about that: >> >> Nowadays I'm using the Update Method from DataAdapter but i figure out > that >> it generate multiples roundtrip to my dbserver so i want to use XML to > send >> all my data to SQLServer and process that in just one travel :P >> >> That XML have all my rows that are Added, Modified and Deleted on my >> Win32Application....So it's possible to process if i send in XML???... >> >> I saw that in SQLServer exist OPENXML function to accomplish that but i >> don't know how to use it.. >> >> Please can you help me!!!! >> >> Regards > > the article is very interesting but i need to know how can i use XML to
execute INSERT, UPDATE and DELETE sentences......Do you know??? Show quoteHide quote "Val Mazur (MVP)" wrote: > Also check my KB article with an example how you could pass XML into SQL > Server stored procedure > > http://support.microsoft.com/default.aspx?scid=kb;en-us;555266 > > -- > Val Mazur > Microsoft MVP > > http://xport.mvps.org > > > > "Sahil Malik [MVP]" <contactmethrumyblog@nospam.com> wrote in message > news:envO8wiOFHA.2520@tk2msftngp13.phx.gbl... > > Yes it is possible. Look at SqlXml and UpdateGrams. > > > > - Sahil Malik [MVP] > > http://codebetter.com/blogs/sahil.malik/ > > > > > > > > "Johny" <Jo***@discussions.microsoft.com> wrote in message > > news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... > >> Hi people I have a question about that: > >> > >> Nowadays I'm using the Update Method from DataAdapter but i figure out > > that > >> it generate multiples roundtrip to my dbserver so i want to use XML to > > send > >> all my data to SQLServer and process that in just one travel :P > >> > >> That XML have all my rows that are Added, Modified and Deleted on my > >> Win32Application....So it's possible to process if i send in XML???... > >> > >> I saw that in SQLServer exist OPENXML function to accomplish that but i > >> don't know how to use it.. > >> > >> Please can you help me!!!! > >> > >> Regards > > > > > > > Hi,
Also check next example http://support.microsoft.com/default.aspx?scid=kb;en-us;316244 Show quoteHide quote "Johny" <Jo***@discussions.microsoft.com> wrote in message news:C56E8431-F66B-4635-94B9-B58F4694F02F@microsoft.com... > the article is very interesting but i need to know how can i use XML to > execute INSERT, UPDATE and DELETE sentences......Do you know??? > > "Val Mazur (MVP)" wrote: > >> Also check my KB article with an example how you could pass XML into SQL >> Server stored procedure >> >> http://support.microsoft.com/default.aspx?scid=kb;en-us;555266 >> >> -- >> Val Mazur >> Microsoft MVP >> >> http://xport.mvps.org >> >> >> >> "Sahil Malik [MVP]" <contactmethrumyblog@nospam.com> wrote in message >> news:envO8wiOFHA.2520@tk2msftngp13.phx.gbl... >> > Yes it is possible. Look at SqlXml and UpdateGrams. >> > >> > - Sahil Malik [MVP] >> > http://codebetter.com/blogs/sahil.malik/ >> > >> > >> > >> > "Johny" <Jo***@discussions.microsoft.com> wrote in message >> > news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... >> >> Hi people I have a question about that: >> >> >> >> Nowadays I'm using the Update Method from DataAdapter but i figure out >> > that >> >> it generate multiples roundtrip to my dbserver so i want to use XML to >> > send >> >> all my data to SQLServer and process that in just one travel :P >> >> >> >> That XML have all my rows that are Added, Modified and Deleted on my >> >> Win32Application....So it's possible to process if i send in XML???... >> >> >> >> I saw that in SQLServer exist OPENXML function to accomplish that but >> >> i >> >> don't know how to use it.. >> >> >> >> Please can you help me!!!! >> >> >> >> Regards >> > >> > >> >> >> Do you have any example????
Show quoteHide quote "Sahil Malik [MVP]" wrote: > Yes it is possible. Look at SqlXml and UpdateGrams. > > - Sahil Malik [MVP] > http://codebetter.com/blogs/sahil.malik/ > > > > "Johny" <Jo***@discussions.microsoft.com> wrote in message > news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... > > Hi people I have a question about that: > > > > Nowadays I'm using the Update Method from DataAdapter but i figure out > that > > it generate multiples roundtrip to my dbserver so i want to use XML to > send > > all my data to SQLServer and process that in just one travel :P > > > > That XML have all my rows that are Added, Modified and Deleted on my > > Win32Application....So it's possible to process if i send in XML???... > > > > I saw that in SQLServer exist OPENXML function to accomplish that but i > > don't know how to use it.. > > > > Please can you help me!!!! > > > > Regards > > >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm/updategram_5kkh.asp
and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm/updategram_5kkh.asp <--- In 2.0 you have a managed provider, in 1.1 you'll need to interop. This is explained very well in Chapter 12 of my first book and Chapter 13 of my second (not published yet). - Sahil Malik [MVP] http://codebetter.com/blogs/sahil.malik/ Show quoteHide quote "Johny" <Jo***@discussions.microsoft.com> wrote in message news:20C933B6-C463-4186-BF14-35817A209052@microsoft.com... > Do you have any example???? > > "Sahil Malik [MVP]" wrote: > > > Yes it is possible. Look at SqlXml and UpdateGrams. > > > > - Sahil Malik [MVP] > > http://codebetter.com/blogs/sahil.malik/ > > > > > > > > "Johny" <Jo***@discussions.microsoft.com> wrote in message > > news:57778A1A-444A-48F3-B1CB-B58B0254CE75@microsoft.com... > > > Hi people I have a question about that: > > > > > > Nowadays I'm using the Update Method from DataAdapter but i figure out > > that > > > it generate multiples roundtrip to my dbserver so i want to use XML to > > send > > > all my data to SQLServer and process that in just one travel :P > > > > > > That XML have all my rows that are Added, Modified and Deleted on my > > > Win32Application....So it's possible to process if i send in XML???... > > > > > > I saw that in SQLServer exist OPENXML function to accomplish that but i > > > don't know how to use it.. > > > > > > Please can you help me!!!! > > > > > > Regards > > > > > >
Other interesting topics
SQL Server does not exist
Join two datatables populated from different sources? memory leak in SqlDataAdapter.Fill method? ADO.Net Connection Pooling Problem with Oracle DataView.RowFilter issue Formatting a SQL query Cannot Open Any More Tables multiple tables in a flat grid Editing Info in a DataTable shared access folder problem |
|||||||||||||||||||||||