Click here to Skip to main content
15,790,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: days of week Pin
Mazdak6-Jan-04 2:39
Mazdak6-Jan-04 2:39 
GeneralRe: days of week Pin
mnaveed6-Jan-04 3:21
mnaveed6-Jan-04 3:21 
GeneralRe: days of week Pin
Mazdak6-Jan-04 3:28
Mazdak6-Jan-04 3:28 
GeneralRe: days of week Pin
Heath Stewart6-Jan-04 3:30
protectorHeath Stewart6-Jan-04 3:30 
GeneralRe: days of week Pin
mnaveed6-Jan-04 4:55
mnaveed6-Jan-04 4:55 
GeneralRe: days of week Pin
Heath Stewart6-Jan-04 6:03
protectorHeath Stewart6-Jan-04 6:03 
GeneralRe: days of week Pin
mnaveed6-Jan-04 6:52
mnaveed6-Jan-04 6:52 
GeneralCreating CSV files Pin
MrEyes6-Jan-04 1:16
MrEyes6-Jan-04 1:16 
This isnt really a question relating to C# but the application that I am working on is written in C# and there isnt really another forum section which is relevant to my question.

Within my application I am taking various values pulled from an MS SQL database and creating a comma delimited CSV file, the problem is that the values in the db have various /n and and /r. In previous versions I have simply stripped this out as if they are present it causes the stream writer to generate incorrect CSV's. The problem is that, as a result of stripping these out, I loose any formatting.

An example is this query :

SELECT val1, val2, val3, val4 FROM table

The code then generates the following CSV file :

val1, val2, val3, val4
abc, def, ghi, jkl

Does anybody know of a way of creating the CSV with the /n and /r included? Double Quoting? Escaping?

post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
GeneralRe: Creating CSV files Pin
Heath Stewart6-Jan-04 5:26
protectorHeath Stewart6-Jan-04 5:26 
Generalreading from DB Pin
hadi20sa5-Jan-04 23:37
hadi20sa5-Jan-04 23:37 
GeneralRe: reading from DB Pin
Mazdak6-Jan-04 1:35
Mazdak6-Jan-04 1:35 
GeneralRe: reading from DB Pin
Anonymous7-Jan-04 0:18
Anonymous7-Jan-04 0:18 
Questiongetting intercept point of lines?? Pin
azusakt5-Jan-04 23:25
azusakt5-Jan-04 23:25 
AnswerRe: getting intercept point of lines?? Pin
Xiangyang Liu 刘向阳6-Jan-04 0:51
Xiangyang Liu 刘向阳6-Jan-04 0:51 
Questionhow to change dos prompt caption! Pin
yu-yu5-Jan-04 22:12
yu-yu5-Jan-04 22:12 
AnswerRe: how to change dos prompt caption! Pin
Philip Fitzsimons6-Jan-04 3:54
Philip Fitzsimons6-Jan-04 3:54 
AnswerRe: how to change dos prompt caption! Pin
Heath Stewart6-Jan-04 4:16
protectorHeath Stewart6-Jan-04 4:16 
GeneralRe: how to change dos prompt caption! Pin
Xiangyang Liu 刘向阳6-Jan-04 4:43
Xiangyang Liu 刘向阳6-Jan-04 4:43 
Questionmoving all an app's menus into menus.cs? Pin
TuringTest15-Jan-04 20:56
TuringTest15-Jan-04 20:56 
AnswerRe: moving all an app's menus into menus.cs? Pin
Member 2611885-Jan-04 22:17
Member 2611885-Jan-04 22:17 
AnswerRe: moving all an app's menus into menus.cs? Pin
Heath Stewart6-Jan-04 3:27
protectorHeath Stewart6-Jan-04 3:27 
QuestionFinding a server in a network? Pin
peshkata5-Jan-04 20:40
susspeshkata5-Jan-04 20:40 
AnswerRe: Finding a server in a network? Pin
Mazdak6-Jan-04 1:50
Mazdak6-Jan-04 1:50 
GeneralProper Way To Determine AM or PM Pin
perlmunger5-Jan-04 13:31
perlmunger5-Jan-04 13:31 
GeneralRe: Proper Way To Determine AM or PM Pin
Heath Stewart5-Jan-04 14:44
protectorHeath Stewart5-Jan-04 14:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.