Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Error using BCP via commandline, same comman did work last week.

Error using BCP via commandline, same comman did work last week.

Scheduled Pinned Locked Moved Database
csharpdatabasesql-serverdebuggingxml
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wizardzz
    wrote on last edited by
    #1

    So sometimes I use bcp from my c# and call it in a separate process while passing it command line arguments. I have been doing this for months, but today it started throwing an ambiguous error. I have changed nothing, so the sudden failure is proving difficult to resolve. I am still able to create the bcp format file, but when I try to insert a file I get: An error occurred while processing the command line. bcp PriceRecords.dbo.SVR5 in "C:\Code\b in\debug\SVR5\1220201093611.csv" -t',' -f "C:\Code\bin\Debug\SVR5.xml" -U xxxxxx -P xxxxxxn -S localhost\SqlExpress where xxxxxx = user and password Using MSSQL 2008, not seeing any error in the SQL logs.

    W 1 Reply Last reply
    0
    • W wizardzz

      So sometimes I use bcp from my c# and call it in a separate process while passing it command line arguments. I have been doing this for months, but today it started throwing an ambiguous error. I have changed nothing, so the sudden failure is proving difficult to resolve. I am still able to create the bcp format file, but when I try to insert a file I get: An error occurred while processing the command line. bcp PriceRecords.dbo.SVR5 in "C:\Code\b in\debug\SVR5\1220201093611.csv" -t',' -f "C:\Code\bin\Debug\SVR5.xml" -U xxxxxx -P xxxxxxn -S localhost\SqlExpress where xxxxxx = user and password Using MSSQL 2008, not seeing any error in the SQL logs.

      W Offline
      W Offline
      wizardzz
      wrote on last edited by
      #2

      It appears wrapping the table name in brackets fixed this issue. I have no idea why this error seemed to have spontaneously started.

      D 1 Reply Last reply
      0
      • W wizardzz

        It appears wrapping the table name in brackets fixed this issue. I have no idea why this error seemed to have spontaneously started.

        D Offline
        D Offline
        Dr Walt Fair PE
        wrote on last edited by
        #3

        Often wrapping the table in brackets fixes problems with naming conflicts, especially if the name conflicts with a reserved word. Of course I have no idea if that applies in your case.

        CQ de W5ALT

        Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups