Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Insert csv file into SQL tables by using fileupload control

$
0
0

Hi Folks...

Plese help me ,i am new in .NET side and i am really worried because my teacher has assigned a mini project to me and i have to complete this ASAP..My project details are below :

1. First ,I have to upload 3 csv files without saving those files on  server.CSV files gonna upload from file upload control every time.

2. Then ,i have to insert those 3 csv files into already created SQL temporary tables and everytime those temporary tables should be truncated before inserting the new data.

Right now,what i have designed is ,i have 3 upload controls and 1 insert button and after this i dont know how to do this.

one more problem is that my csv files header could be changed .Like if i uploaded 1 csv file(STUDENT.csv) in this header format :

StudID,StudName

then other time when i m again want to upload csv file (STUDENT.csv) having header format:

StID,StNm

In this scenario hardcoded things for csv insertion wont work..

Please give me some solution..

Thanks in advance !!


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>