Click here to Skip to main content
15,922,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

When I am trying to create back using below script
C#
I am getting below error.



bcp -a Item_Details out C:\DB\1.dat -n -username -PWD

Warning: Packetsize size must be between 512 and 65535 -- defaulting to 4096.
bcp: unknown option 1
usage: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]

could you please help to fix this.

Thanks,
amit

What I have tried:

Hi

When I am trying to create back using below script
C#
I am getting below error.



bcp -a Item_Details out C:\DB\1.dat -n -username -PWD

Warning: Packetsize size must be between 512 and 65535 -- defaulting to 4096.
bcp: unknown option 1
usage: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]

could you please help to fix this.

Thanks,
amit
Posted
Updated 14-Jul-16 21:54pm

1 solution

I guess that your path to the out file is actually not C:\DB\1.dat, but something else with a space in it. You must enclose such paths in "": e.g. "C:\Some Folder\Some File.dat".
 
Share this answer
 

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