Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012
    Posts
    7

    Question Unanswered: Bulk Insertion does not support Triggers

    Hi,
    I'm writing a code to bulk insert from data table to oracle database (11g).
    This code is properly working.
    Code:
    private string SaveAllowances(DataTable dt)
            {
                orclCon.Open();
                using (OracleBulkCopy bulkCopy = new OracleBulkCopy(orclCon))
                {
                    bulkCopy.ColumnMappings.Add("Type", "ALLOWNCE_TYPE");
                    bulkCopy.ColumnMappings.Add("Flag", "ALLOWNCE_FLAG");
                    bulkCopy.ColumnMappings.Add("Amount", "ALLOWNCE_AMT");
                    bulkCopy.ColumnMappings.Add("StartDate", "START_DATE");
                    bulkCopy.ColumnMappings.Add("EndSate", "END_DATE");
                    bulkCopy.ColumnMappings.Add("WorkItmId", "WORKITEM_ID");
                    bulkCopy.DestinationTableName = "TBL_TEMP";
                    bulkCopy.WriteToServer(dt);
                    orclCon.Close();
                    return "Success";
                }
            }
    Now problem is that in db table if I've 1 more column with auto increamented sequence number it throws the exception Bulk Insertion does not support Triggers.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    It appears you need to make a choice
    1) don't use trigger
    2) don't use Bulk collect
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

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