I wrote a program in early 2010 that ran a command line function that pulled data from SQL Server 2005. The program worked at the time, but does not seem to work now (for various reasons, it was not used for about a 1 year).

BCP "EXEC emdb..Patch2" QUERYOUT D:\shares\patch2.txt -S GEN-SERVER\EMMSDE -t "~" -c

The error message says "Copy direction must be in, out or format." I'm trying to figure out what I need to change to make this work; Please note that I don't actually have any programming background (it was extensive research into books that my boss no longer has). Thanks,

Try this format

bcp emdb..Patch2 out D:\shares\patch2.txt -c -T -S GEN-SERVER\EMMSDE
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.