Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 BCP produces a jibberish file

Author  Topic 

jamie
Aged Yak Warrior

542 Posts

Posted - 2005-06-14 : 05:09:32
hi, I have been using BCP to create a text file, all of a sudden, now when I open the file all i can see is lines like :
#13361;#12592;‰††††††††††††††††††††††#11841;#11843;#11845;#17184;#28261;#29300;#8293;†††††††††††††††††††††††#29509;#24948;#27746;#29545;#28008;#28261;#8308;††††††††#25943;#29811;#20256;#28536;#8302;†††††††††††††††††††††††††#11841;#11843;#11845;#17184;#28261;#29300;#8293;†††††††††††††††††††††††#30018;#26226;#29295;#8292;#28498;#25697;†††††††††#26691;#28777;#26992;#26478;#20000;#29295;#28532;#8302;†††††††#30799;#28518;#25714;#26739;#29289;#8293;†††††††††#22607;#8247;#17461;#8282;†††#13600;#14385;#13360;#12081;#12336;#17696;#12622;#12592;‹†#16672;#17198;#17710;#8238;#25923;#29806;#25970;††† ††††††††† †††††††††††††††††††††††#25665;#27765;#8308;††††††††††††††††††††††#27713;#8300;†††††††††††††††††††††††#25943;#29811;#20256;#28536;#8302;††††††††††††††††††††#28483;#28013;#28277;#29801;#8313;#25669;#25461;#29793;#28521;#8302;††††††††††††††††††††††††††††††††††††††††#26691;#28777;#26992;#26478;#20000;#29295;#28532;#8302;†††††††††††††††††#26691;#28777;#26992;#26478;#20000;#29295;#28532;#8302;†††††††††††††††††#28751;#29285;#29793;#28521;#24942;#8300;#8237;#26948;#25970;#29795;#21280;#29285;#26998;#25955;#20512;#28530;#25968;#29810;



if I remove the \r from the last line format file it works ok.
anyone seen this problem before ?

jamie
Aged Yak Warrior

542 Posts

Posted - 2005-06-14 : 05:18:38
just test this again, and it fails if the last line in my format file is "\r\n"

works for "\r" and works for "\n" but not both together .. .
Go to Top of Page

jamie
Aged Yak Warrior

542 Posts

Posted - 2005-06-14 : 05:49:07
ps, for some reason when I copied the text into sqlteam website it has converted it to numbers. when I can see if just weird caracheters like wingdings
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-06-14 : 07:19:09
Is it possible you exported the file into native format, instead of character format?
Go to Top of Page

jamie
Aged Yak Warrior

542 Posts

Posted - 2005-06-14 : 07:28:02
how would I know that ?
each format line looks similar to :

30 SQLCHAR 0 11 "" 30 SuspensionDate ""


no language is set at the end...
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-06-14 : 07:32:48
Normally when I see gibberish files it's because they're either in Unicode text or native format (or possibly Unicode native format). Can you post the entire format file and the actual command line you used to generate the data file?

My next suggestion is to run bcp without the format file, with a -c flag, and see what that generates. If that comes out clean, then the format file is doing something wrong.
Go to Top of Page
   

- Advertisement -