DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Parsing a text or excel file into a database

  1. #1
    Amy Guest

    Parsing a text or excel file into a database


    Does anyone know how to create an application that will automatically open
    a file and parse it into a database? Trying to handle a file that has been
    uploaded into a webserver and have the contents of the file parsed into a
    database.

  2. #2
    michael Guest

    Re: Parsing a text or excel file into a database


    If the file is already formatted correctly you can take a look at the bcp
    command "bulk copy" in sql server. If the file is not formatted you can create
    a work table and populate it via the bcp command then call a stored procedure
    to massage the data and insert it into the proper tables with in the database.
    The slowest alternative, if the above is not applicable, is to use the FileSystemObject.
    Using the FileSystemObject, you will have to read through each line and
    insert data one row at a time with insert statement.

    Michael

    "Amy" <gi_armybabe@hotmail.com> wrote:
    >
    >Does anyone know how to create an application that will automatically open
    >a file and parse it into a database? Trying to handle a file that has been
    >uploaded into a webserver and have the contents of the file parsed into

    a
    >database.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center