You can use ADO.NET to interact with CSV files, although I've never used it to write on from scratch. I'd guess that it would be possible though. Alternatively, you can just use a StreamWriter, as you would for any normal text file. Just use an outer loop to iterate over the rows in the table and an inner loop to iterate over the fields in the row.
Oh it works alright. The principle is sound but you obviously have to code it right. How about you post the code you tried and we'll try to work out the issues.
How Export table as .csv file
jc terry
Ours
Ruslan Inozemtsev
This task will probably required the bcp utility or DTS (Data Transformation Services) if you want to export directly.
I've done this with SQL, but it requires an ODBC connection and AFAIK SQL Server Express doesn't support it.
Eddie H
moh081
Not work for me.
I need export data tables(SQL Server express) in CSV file, for import this CSV in WEB sql server. Help me please.
Thanks.