• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

database and xml

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
an XML file, called agents.xml, containing the details of at least 5 travel agents. The structure of the file is as follows:
<agents>
<agent eno="" name="">
<address>
<line1></line1>
<line2></line2>
<line3></line3>
<postcode></postcode>
<region></region >
<country></country>
<address>
</agent>
</agents>
How to populate a Microsoft Access database with the agents details and to read the data from the database in the correct order for displaying.
Will it involve first insert and then selecting.Is there another way around
for inserting my xml file into the database.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to read the <agent> elements from the XML file one at a time and make an SQL INSERT for stuffing the data into the database. I gave you an example of the first part in the XML forum.
Here's a piece of code that will do the inserts:
 
reply
    Bookmark Topic Watch Topic
  • New Topic