Results 1 to 4 of 4

Thread: Importing Xml to Access

  1. #1

    Thread Starter
    Join Date
    Feb 2008

    Importing Xml to Access

    Hello I want to build a program, that automatically imports lots of xml files to access database. The number of files, probably will be between 100-500.
    I have a couple of questions.
    1. Sould I work with datasets, open database, close etc? If I want to import only one file, I open access, go tο File > Get External Data ....
      Is there a way to do this through vb, underground for number of files?
    2. If I work with dataset, should I close and dispose connection every time a file is loaded, or should I load all files and then close?
    Last edited by manin; May 19th, 2010 at 07:36 AM.

  2. #2
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Chit Chat Forum.

    Re: Importing Xml to Access

    Do you want to load the elements in your file or the entire file?

    How does your XML look like? .NET allows you to use your XML like a record source.
    Here's an article that describes this.

    In my opinion, it would depend on the number of files you have to process and the time that it takes to process each file?
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  3. #3

    Thread Starter
    Join Date
    Feb 2008

    Re: Importing Xml to Access

    For now I don't have a file, to see it's structure.
    Probably next, week. I will follow your link, and study it.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002

    Re: Importing Xml to Access

    if all of the files have the same structure and layout, I'd probably see about reading them all into one datatable , then loop through it and insert into Access.

    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width