Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

csv files to ms sql using asp 1

Status
Not open for further replies.

b00gieman

Programmer
Jul 9, 2007
60
DE
Hi!
Does anyone know how to export .csv files into a table using asp?
thanks in advance
 
BCP Utility

But then again export/import, upload/download blah, balh needs clarification as Chris stated

[sub]____________ signature below ______________
You are a amateur developer until you realize all your code sucks.
Jeff Atwood[/sub]
 
Sorry.What I want to do is to import data from a csv file into a sql table
 
Not sure why that tgml broke. maybe the +'s. Anyhow look into calling bcp to literally slame the csv into the table. This will be your fastest performaing solution. If your sql server has openrowset enabled you can also use it to grabt the csv and pull the data into sql server.

Avoid and I stress "Avoid" parsing the csv and sending hundreds if not thousands of inserts to the database. This is horribly bad and not needed. You should use the database servers provided tools to pick the best one.

[sub]____________ signature below ______________
You are a amateur developer until you realize all your code sucks.
Jeff Atwood[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top