Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:26:42+00:00 2026-06-16T04:26:42+00:00

I’m performing SQL bulk copy using the SqlBulkCopy class. I created my destination table

  • 0

I’m performing SQL bulk copy using the SqlBulkCopy class. I created my destination table to be exactly the same of my source table. They both have the same table name, columns names, data types and even the same collation. I did also the sql mapping to ensure accuracy.

My code as follow:

SqlConnection SourceConnection =  new SqlConnection(SourceConnectionString);
SqlConnection DestinationConnection =  new SqlConnection(DestinationConnectionString);

DestinationConnection.Open();
SourceConnection.Open();

SqlCommand commandSourceData = new SqlCommand("SELECT * FROM Requisitions;", SourceConnection);

SqlDataReader reader = commandSourceData.ExecuteReader();    

    using (SqlBulkCopy bulkCopy = new SqlBulkCopy(DestinationConnection))

    {
           bulkCopy.DestinationTableName = "Requisitions";


           bulkCopy.ColumnMappings.Add("RequisitionId", "RequisitionId");
           bulkCopy.ColumnMappings.Add("CreatedBy", "CreatedBy");
           bulkCopy.ColumnMappings.Add("DateCreated", "DateCreated");
           bulkCopy.ColumnMappings.Add("AircraftTailNum", "AircraftTailNum");
           bulkCopy.ColumnMappings.Add("JobNumber", "JobNumber");
           bulkCopy.ColumnMappings.Add("ShopCode", "ShopCode");
           bulkCopy.ColumnMappings.Add("RequestedByName", "RequestedByName");
           bulkCopy.ColumnMappings.Add("RequestedById", "RequestedById");
           bulkCopy.ColumnMappings.Add("Status", "Status");
           bulkCopy.ColumnMappings.Add("IsCancelled", "IsCancelled");
           bulkCopy.ColumnMappings.Add("IsProcessed", "IsProcessed");


           try
               {
                  // Write from the source to the destination.
                  bulkCopy.WriteToServer(reader);
                }
          catch (Exception ex)
                {
                     Console.WriteLine(ex.Message);
                 }
          finally
                 {

                    reader.Close();
                  }
          }

However, every time I execute my code I got the following error:

The locale id ‘1025’ of the source column ‘CreatedBy’ and the locale
id ‘1033’ of the destination column ‘CreatedBy’ do not match.

I have searched a lot over the internet but no luck for any solution. I would be so thankful if someone helped me out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:26:43+00:00Added an answer on June 16, 2026 at 4:26 am

    Try like this

      public DataTable fetchValue()
        {
            SqlDataAdapter dap=new SqlDataAdapter("SELECT RequisitionId,CreatedBy,DateCreated,AircraftTailNum,JobNumber,ShopCode,RequestedByName,RequestedById,Status,IsCancelled,IsProcessed FROM Requisitions;", cn);
            DataSet ds=new();
            dap.Fill(ds);
            return ds.Tables[0];
        }
    

            DataTable dtgenerate=new DataTable();
            dtgenerate=fetchValue();
    
           cn.open();
           using (SqlBulkCopy bulkCopy = new SqlBulkCopy(n))
           {
               bulkCopy.DestinationTableName = "Requisitions";//DestionTableName
               // bulkCopy.ColumnMappings.Add("SourceColumnIndex", "DestinationColumnIndex");  
               bulkCopy.ColumnMappings.Add("RequisitionId", "RequisitionId");
               bulkCopy.ColumnMappings.Add("CreatedBy", "CreatedBy");
               bulkCopy.ColumnMappings.Add("DateCreated", "DateCreated");
               bulkCopy.ColumnMappings.Add("AircraftTailNum", "AircraftTailNum");
               bulkCopy.ColumnMappings.Add("JobNumber", "JobNumber");
               bulkCopy.ColumnMappings.Add("ShopCode", "ShopCode");
               bulkCopy.ColumnMappings.Add("RequestedByName", "RequestedByName");
               bulkCopy.ColumnMappings.Add("RequestedById", "RequestedById");
               bulkCopy.ColumnMappings.Add("Status", "Status");
               bulkCopy.ColumnMappings.Add("IsCancelled", "IsCancelled");
               bulkCopy.ColumnMappings.Add("IsProcessed", "IsProcessed");
    
               bulkCopy.WriteToServer(dtgenerate);
           }
           cn.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When performing an insert lets say from C# into a SQL Server table (using
I am curious on how exactly LINQ (not LINQ to SQL) is performing is
I am performing an sql query using PDO. In the resulting PDOStatement, there is
When I am performing deletes from an Sql table, how would I do the
The scenarios is like this: We have some SQL table. We are performing an
Using SQL Server 2005 Given a table: | Role | Low | High |
I'm performing a bulk insert with an ADO.NET 2.0 SqlBulkCopy object from a C#
I am performing some DB(SQL) operation in Android using phonegap... Although everything is working
I've read quite a bit about SQL Servers using SSDs performing much better than
Let's say I'm performing a SQL query from a Java program to get timestamps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.