title: Can't create XML format file in SQL, bcp: unknown option A
body: <p>I have tried many things, but I'm still not getting this to work. Here's the code:</p>
  
  <pre><code>bcp RFID.dbo.ResultsDump format nul -t, -c -x -f C:\RFID.xml -S"ALBERTLAST-PC\SQLEXPRESS" -UAlbert Last -P -T
  </code></pre>
  
  <p>All I want to do is create an XML format file from ResultsDump table, and the above statement doesn't even work. My username is "Albert Last" where Last is my last name, yet this is what the above statement returns:</p>
  
  <pre><code>bcp:  unknown option A
  usage: bcp {dbtable | query} {in | out | queryout | format} datafile
    [-m maxerrors]            [-f formatfile]          [-e errfile]
    [-F firstrow]             [-L lastrow]             [-b batchsize]
    [-n native type]          [-c character type]      [-w wide character type]
    [-N keep non-text native] [-V file format version] [-q quoted identifier]
    [-C code page specifier]  [-t field terminator]    [-r row terminator]
    [-i inputfile]            [-o outfile]             [-a packetsize]
    [-S server name]          [-U username]            [-P password]
    [-T trusted connection]   [-v version]             [-R regional enable]
    [-k keep null values]     [-E keep identity values]
    [-h "load hints"]         [-x generate xml format file]
  NULL
  </code></pre>
  
  <p>It's thinking that I am asking for option A, because when I put square brackets around Albert Last, here's what I get: </p>
  
  <pre><code>bcp:  unknown option [
  </code></pre>
  
  <p>I've also tried this WITHOUT specifying server name, username, or password, with just -T. This is what I get:</p>
  
  <pre><code>SQLState = 37000, NativeError = 4060
  Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database "RFID" requested by the login. The login failed.
  SQLState = 28000, NativeError = 18456
  Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
  NULL
  </code></pre>
  
  <p>I've looked everywhere online and have not seen a similar problem before, and I'm beginning to think that this is just a simple mistake that I'm not catching.</p>
  
  <p>Can somebody help?? Or if there is a way to generate format xml file RFID.xml from table ResultsDump without bcp, that would be greatly appreciated! Thanks in advance!</p>