Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002

    Red face Unanswered: Bulk Insert SQL Server in C#

    I am searching for an efficient way to do
    bulk inserts via C#. It seems there are three
    ways of doing that:

    1.) Copy values to file and call BCP or BULK INSERT in TSQL
    2.) Call the IRowFastLoad Interface of the SQL OLEDB Provider
    3.) bcp interface of the ODBC driver

    I think 2.) and 3.) are the only viable solutions and I wanted
    to ask if anybody out there has already experiences
    with these interfaces and the way of invocating them in C#.

    Thank you for your help.

    Solution Architect
    Management Factory

  2. #2
    Join Date
    Dec 2001
    Toronto, Canada
    You may want to look at using SQL-DMO with C#. I've not coded in C# however I have used SQL-DMO with VB, VBScript (in an ASP page) and Perl.

  3. #3
    Join Date
    Feb 2002


    Thanks for the help.

    Using SQL-DMO seems to be quite the same than inserting into a
    file and then calling BCP, right ?
    What I am looking for is a more efficient approach (memory to
    SQL Server), because my routine has to work for 1 record to
    millions of records in a fast way.


Posting Permissions

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