How to quote database names with spaces when using queryout with bcp?
The solution I settled on was to specify the database name using the -d flag.

bcp "SELECT char(34) + REPLACE([Code], '""""', '""""""""') + char(34),
    char(34) + REPLACE([Description], '""""', '""""""""') + char(34)
    FROM [Table Name]"
    queryout C:\Users\jwallace\out.csv -c -t ","
    -d "Database Name With Spaces" 
    -S "10.0.0.1,1848" -U username -P password -k