You must first read the CSV file into something like a DataSet. I you use a DataSet you can just update the DataSet to the database with the SqlDataAdapter class.
If you also want to import the structure, then you need to generate DDL queries as well based on the CSV file.
You can also import csv files with DTS or BCP. DTS is the easiest, BCP is the fastest (if you have really big files) Lookup DTS and BCP in BOL or take a look a this great DTS site: http://www.sqldts.com/.
Thanks so much..I wonder is there any DDL sample or reference site
I am stuck with the DDL ,and I got my CSV dataSet ready~
You must first read the CSV file into something like a DataSet. I you use a DataSet you can just update the DataSet to the database with the SqlDataAdapter class.
If you also want to import the structure, then you need to generate DDL queries as well based on the CSV file.
You can also import csv files with DTS or BCP. DTS is the easiest, BCP is the fastest (if you have really big files) Lookup DTS and BCP in BOL or take a look a this great DTS site: http://www.sqldts.com/.
Question on How to Import CSV file into SQL Express
Question on How to Import CSV file into SQL Express
Archonn
By the way,
I am using Visual Studio 2005 and SQL Express 2005~
how do I read the CSV file and put into SQL
Angusl
Thanks so much..I wonder is there any DDL sample or reference site
I am stuck with the DDL ,and I got my CSV dataSet ready~
WastingBody
ch
Great...CREATE AND ALTER IS GOOD
haha
Thanks
Spenceee
If you also want to import the structure, then you need to generate DDL queries as well based on the CSV file.
You can also import csv files with DTS or BCP.
DTS is the easiest, BCP is the fastest (if you have really big files)
Lookup DTS and BCP in BOL or take a look a this great DTS site: http://www.sqldts.com/.