...

View Full Version : import CSV to SQL DB Using asp



jerusking
02-24-2007, 07:40 AM
Hi guys, is there anyone can help or any one can give me idea about importing CSV to DB using asp? Looking forward. THanks

Jerus

Spudhead
02-28-2007, 12:05 PM
I don't know any way to do a bulk insert, but it's possible to open a CSV file as an ADODB recordset. From there you can get the data into an array using getRows(), and loop through it running INSERT statements against your target database. It's not the fastest method in the world (I'm running something similar on our intranet against an MSSQL db and the quickest I can get it down to is about 14 inserts a second), but it works:


sFileConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDataDirectory;Extended Properties=""text;HDR=No;FMT=Delimited"""
sFileSQL = "SELECT * FROM [myfile.csv]"

jerusking
03-04-2007, 10:57 AM
Hi spudhead nice to see u again, iam importing csv file to my webhosting db. it should be a webbased...i have to attach the file then upload button on it.

SSJ
03-07-2007, 08:18 AM
visit this
http://www.15seconds.com/howto/pg000950.htm

SSJ
03-07-2007, 08:18 AM
This one also
http://www.webmasterworld.com/forum47/1217.htm

hope this will help..

degsy
03-08-2007, 11:44 AM
iam importing csv file to my webhosting db. it should be a webbased...i have to attach the file then upload button on it.
Doesn't your host have a control panel or database front end?

jerusking
03-11-2007, 12:58 PM
There is a CSV import wizard on the sql webbased for my hosting, there is no front end...i just like to create a combox to upload the csv file and submit to the db of my hosting web.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum