Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2008
    Posts
    2

    Unanswered: incompatible of ODBCBCP/PILOTE

    When Running EXEC master..xp_cmdshell 'bcp it gives an error saying incompatible of ODBCBCP/PILOTE, what can be the problem??

    Thanks

    Rafa

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    post the code you are running.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    EXEC master..xp_cmdshell 'bcp "select * from bd..table" queryout c:\test.txt -c '

    SQLState = S1000, NativeError = 0

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    that looks incomplete.

    Where is the connection information for the server database username etc... I would check SQL Server Books Online for the syntax for those aguments for BCP.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    This works fine on any 2K5+ edition:

    Code:
    set nocount on
    exec sys.sp_configure 'show', 1
    reconfigure
    exec sys.sp_configure 'xp_cmdshell', 1
    reconfigure
    create table #t ([output] varchar(70) null)
    insert #t exec master..xp_cmdshell 'bcp "select * from master.sys.tables" queryout c:\temp\test.txt -S. -T -c'
    select * from #t where [output] is not null
    drop table #t
    exec sys.sp_configure 'xp_cmdshell', 0
    reconfigure
    exec sys.sp_configure 'show', 0
    reconfigure
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •