Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
The problem is that the bcp utility gives a user such a vast range of options to enhance output that choosing the proper combination is done only after lengthy trial and error.

A standard group used in many solution answers to related questions on the internet about use is "-w -T -S", for instance. This means "wide character", "Trusted", and "Servername". And that's pretty intuitive because it's basic knowledge of the data before it goes into the blackbox.

But I expect more from the bcp itself. The formatting is lacking. Meaning, short-story, if I open my output xml with notepad there's no whitespace, no blank, no linefeed, no carriage return; you get the idea.

Sure, I can convert this bad xml using a third party app by simply clicking on a command such as "apply XML formatting". Open it in notepad ... everything's fine.

But why, and better yet WHAT are the switches I should deploy to preserve LF/CR and subsequently get the PRETTY xml spaghetti I'm hungry for, does bcp short it's users in this respect?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900