|
Posted by Erland Sommarskog on 01/05/07 23:28
EricR (erucevice@gmail.com) writes:
> When the text file comes out of my Java application the last line
> record has a carriage return which creates the blank line at the end of
> the file. There are no blank lines between records. Thanks
Ah, I think misunderstood you. So you file looks like this:
Order Number~Company Name~Product~Quantity~ID~User~Date~Site\r\n
Order Number~Company Name~Product~Quantity~ID~User~Date~Site\r\n
Order Number~Company Name~Product~Quantity~ID~User~Date~Site\r\n
Order Number~Company Name~Product~Quantity~ID~User~Date~Site\r\n
\r\n
Since I don't know Java, I need to ask a really stupid question: do
you really need that extra \r\n at the end? Can't you prevent Java
from adding it? Because, it can be quite difficult to get BCP to handle
that file. BCP believes in complete records so to speak.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|