2 Replies

I would just script it and run an executable so that its easier to read and write:

I don't know how you want to customize each CSV file, but if you give me more details I could help with that too.

VB.net

PrivateSubMain()Dimtable=NewDataTable'Creates Table for For LoopUsingsqlConnection=NewSqlConnection("ConnectionString")'Connects to DB for ReadingUsingda=NewSqlDataAdapter("SELECT Column1, Column2, ColumnX FROM TableName ORDER By Column1",sqlConnection)'Executes Query' you dont need to open/close the connection with a DataAdapter 'da.Fill(table)'Stores Query in TableEndUsingEndUsing'Begin LoopForEachrowAsDataRowIntable.Rows'Create code for custom CSV NextEndSub