I'm assuming that you mean csv format, instead of cvs. There is no
built in way in c# to pull data from sql server and save it out as
csv. If you don't have a need to use c#, you can just use the sql
server 2000 import/export wizard, or the sql server 2005 import/export
wizard. If you want to automate it, you would use dts in sql server
2000 or ssis in sql server 2005. To actually use c#, you can use
CsvWriter from
http://www.csvreader.com. The exact c# code depends on
how much data you have. If it's a fairly small amount of data, you can
load into into a DataTable and then use the WriteAll method to write
the contents out to the csv file. If it's a large amount of data,
you'll have to loop over each column for each row and call the Write
method to write each field.
Bruce Dunwiddie