How Export table as .csv file

I need export the data. Please help-me.

Thank's



Answer this question

How Export table as .csv file

  • jc terry

    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.
  • Ours

    Thanks
  • 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

    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.
  • 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.


  • How Export table as .csv file