473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

adding records to multiple tables in MSDE 2000 from XML using ADO.NET

PA
I am using .NET web aplication and MSDE 2000. I receive new record in
XML format which I want to add into MSDE 2000. I am doing it as below.

Private Sub InsertNew(ByVal sData1 As String)
Dim SR1 As System.IO.StringReader = New
System.IO.StringReader(sData1)

DS1.ReadXml(SR1)
SqlDataAdapter1.Update(DS1)

End Sub

This works fine with one table.

But say, I receive following XML data:
<ORDER>
<COMPANY>DIXON</COMPANY>
Nov 11 '05 #1
1 1995
Please don't cross-post to multiple groups.

You would likely need to issue multiple Update commands against each
DataTable, specifying the correct InsertCommand, UpdateCommand, and
DeleteCommand for each DataTable. Issue an update for the Items table
separately from the Update for the other table(s).
--
Kirk Allen Evans
www.xmlandasp.net
Read my web log at http://weblogs.asp.net/kaevans
"PA" <pr*******@jvc.co.uk> wrote in message
news:f7**************************@posting.google.c om...
I am using .NET web aplication and MSDE 2000. I receive new record in
XML format which I want to add into MSDE 2000. I am doing it as below.

Private Sub InsertNew(ByVal sData1 As String)
Dim SR1 As System.IO.StringReader = New
System.IO.StringReader(sData1)

DS1.ReadXml(SR1)
SqlDataAdapter1.Update(DS1)

End Sub

This works fine with one table.

But say, I receive following XML data:
<ORDER>
<COMPANY>DIXON</COMPANY>
.
.
.
<ITEMS>
<ITEM>
<NAME>SONY - 32 inch</NAME>
<QTY>2</QTY>
</ITEM>
<ITEM>
<NAME>PHILIPS - 32 inch</NAME>
<QTY>1</QTY>
</ITEM>
</ITEMS>
.
.
.
</ORDER>

I want to add a new record(s) in Items table for above items and
remaining data as a new record in some other table. How can I do this?

Thanks.

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
2
by: C Kirby | last post by:
I'm running a DB using MSDE (2000) that is interfaced by 2 different ades running on PCs with Access 2000 Runtime. One of the ADEs is a package accounting system that is very solid and stable, the...
5
by: Igor Solodovnikov | last post by:
Hi. I am trying to automatically backup transaction log when error 9002 happened. So i have created appropriate job and alert to catch this error. I have two instances of sql server under Windows...
10
by: noname | last post by:
MSDE 2000 Release A installed under windows 2000 pro will not communicate with SQL Server Manager nor MS Access on peer computer. Can someone help? Have set DISABLENETWORKPROTOCOLS=0 at install...
1
by: miltonmoura | last post by:
Hi, I am using Merge Replication for synchronizing a bunch of laptops running MSDE with a central SQL Server 2000 production server. This database is used by an application that needs to know...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
35
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 =...
6
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and...
5
by: Neil | last post by:
I'm running Access 2000 with a SQL 7 back end, using ODBC linked tables in an MDB file. The db is used by about 30 users on a LAN, and an additional 10 or so on a WAN. Recently, one of the WAN...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.