We also faced same issue while doing BCP and it turned out to be an issue with new line character in .dat file.
View the file in Notepad++ and click on "Show All Characters" to see the new line character.
BCP throws following error with -r "
" option i.e. with below command
bcp dbo.Test in C:Test.dat -c -t "|" -r "
" -S "DBServerName" -T -E
" SQLState = 22001, NativeError = 0 Error = [Microsoft][SQL Server
Native Client 10.0]String data, right truncation "
BCP treat all rows in file as a single row with -r "
" or -r "
" option i.e. with below command
bcp dbo.Test in C:Test.dat -c -t "|" -r "
" -S "DBServerName" -T -E
Issue was resolved when we used the Haxadecimal value (0x0a) for New Line character in BCP command
bcp dbo.Test in C:Test.dat -c -t "|" -r "0x0a" -S "DBServerName" -T -E
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…