Are there any .Net libraries that provide a way of exporting sql database data to plain text files (i.e. csv\tsv)? SqlBulkCopy only applies to the import part of the solution and I prefer not to be calling any Process.Start calls to open up command prompts to call bcp.exe.
+1
A:
As such there is no .net library which you can use for export data into txt/csv. You can use StreamWriter to write data in txt/csv file.
Jeevan Bhatt
2010-10-13 06:57:06
A:
Would calling a stored procedure work for you? I did a quick Google for using bulk copy in a procedure and found this article:
Tony
2010-10-13 08:01:45
A:
Check out FileHelpers - it allows you to easily load or save data from CSV or other text file formats. Excellent code base, freeware, full C# source available - can't recommend it enough!
marc_s
2010-10-13 08:38:32