how to use bcp using c#,

Posted on 2014-08-22
Last Modified: 2014-09-09
I want to create a application using and c# for importing csv files using bcp utility
Question by:SQL .NET
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    Is there a question in there somewhere?

    Author Comment

    by:SQL .NET
    Yes, sorry for that. Can you please give me some coding example of how to import a *.dat file using c# in using program  with the help of bcp utility using format files?.
    BCP utility is used with the command line and i have search for day but i cant find a guide or example of how to use bcp utility with the help of .net application and not command prompt.
    as you can see the dat file. I want to create an application using c# to import this data into sql server table. As i have to import some of the columns and not all i will will have to use format files. so i want an example of how to achieve this. Thank you
    LVL 35

    Accepted Solution

    Check my latest answer in this question

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now