Please can someone help me

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teddymeu
    New Member
    • Feb 2007
    • 19

    Please can someone help me

    Hi Guys,

    im a real newbie to asp.net vb infact im new to development but im gradually learning.

    Ive built an app using visual studio 2005 asp.net vb and sql. The app searches local postoffices and displays them depending on the postcode or town or street. All works fine.

    The server ill be deploying too does not have sql on it so im using an mdf file.

    MY PROBLEM
    I need to have a facility where the user can upload a csv file and it imports/overwrites current data in one particular table in the database. the site has user management and only admins can do this, (this is working too).

    Ive read alot of stuff am im very confused, i just want a simple asp.net vb page that allows them to choose the file and it will upload straight into that table.

    Can someone explain how to do this in plain english as im realy confused.

    Thanks in advance
    Dan
  • chazcross
    New Member
    • Feb 2007
    • 31

    #2
    Im going to assume you have no problems with writing code to select/update/delete anything from the database.

    If your not familiar with the uploadfile control check out this
    FileUpload

    Now the nest issue is parsing the csv file that you just uploaded and saved to the HD (or memory)

    The best csv parser i have ever used is HERE
    You can easily get how to use it and get the columns you want just be checking out the examples.

    You then need to come up with a way to determine if you need to add/update the data in the database. Check if the cvs file has a column informing what action to take or if you need to query the db for an existing row and update that.

    Comment

    • teddymeu
      New Member
      • Feb 2007
      • 19

      #3
      Originally posted by chazcross
      Im going to assume you have no problems with writing code to select/update/delete anything from the database.

      If your not familiar with the uploadfile control check out this
      FileUpload

      Now the nest issue is parsing the csv file that you just uploaded and saved to the HD (or memory)

      The best csv parser i have ever used is HERE
      You can easily get how to use it and get the columns you want just be checking out the examples.

      You then need to come up with a way to determine if you need to add/update the data in the database. Check if the cvs file has a column informing what action to take or if you need to query the db for an existing row and update that.
      Thanks for your reply, ive come up with my own solution and posted some probs ive had with it in the asp.net forum, any help you could give would be great

      Comment

      Working...