none
How to call BCP inside .Net CLR RRS feed

  • Question

  • hi,

    How to call BCP command Inside Dot Net CLR

     

    Thanks


    Mark as Answer If appropriate - SSS.Ezhil
    • Moved by Bob Beauchemin Thursday, July 1, 2010 2:58 AM Moved to a more relevent forum (From:.NET Framework inside SQL Server)
    Wednesday, June 30, 2010 5:16 PM

Answers

All replies

  • Are you looking for the SqlServer provider's SqlBulkCopy class or asking about how to call an executable program (bcp.exe) from the .NET APIs?

    Bob

    Thursday, July 1, 2010 2:58 AM
  • You can use SQLBulkCopy as Bob suggested. If you really need to use command line BCP then you would have to use the Process Class .

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, July 1, 2010 1:28 PM
  • Hi Bob,

     

    I want to achieve BCP thing through .NET CLR. I thing please explain the SQL server provider's Bulk copy.

     

     


    Mark as Answer If appropriate - SSS.Ezhil
    Thursday, July 1, 2010 4:11 PM
  • The information on how to use SqlBulkCopy is here:
    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx.
    Underneath, its uses a similar (if not the same) API as BCP does.
     
    Cheers, Bob
     
     
    Thursday, July 1, 2010 10:07 PM