View Full Version : import CSV to SQL DB Using asp
02-24-2007, 06: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
02-28-2007, 11:05 AM
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]"
03-04-2007, 09: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.
This one also
hope this will help..
03-08-2007, 10: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?
03-11-2007, 11:58 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.