trying to create an xml format file

  • Hi

    I see this all over for creating a Format file:

    bcp Northwind.dbo.Products format nul -c -f "c:\Products.fmt" -T

    Or this for XML

    bcp AdventureWorks.HumanResources.Department format nul -c -x -f department.xml -T -S servername

    I get an error saying "cannot open a connection to SQL SERVER"

    The SQL Server is local on my laptop.

    Here is the exact code I am using:

    bcp OrderDb.CompanyDepartment foramt nul -c -x -f c:\CompanyDepartment.fmt -t, -T

    and I have tried

    bcp OrderDb.CompanyDepartment foramt nul -c -x -f c:\CompanyDepartment.xml -t, -T

    Also, some say to put the server name at the end, but then I get an unknown argument on command line error

    thank you

  • Hi,

    I jsut got this to work:

    I had to add -S and the server name

    Thanks:-)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply