how to insert records in a table using script task

Nilimesh Maiti 0 Reputation points
2024-06-19T03:33:51.8233333+00:00

I would like to insert records in a table by using script task. I cant use execute sql task and other task available in ssis. The script should be in C#.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,097 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,490 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,501 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 34,581 Reputation points
    2024-06-19T05:30:40.7866667+00:00

    Hi @Nilimesh Maiti,

    You may refer to below links to see if it could meet your need or not.

    ssis-data-import-script-task

    inserting-into-a-table-using-ssis-script-task

    How to insert Records in Database using C# language

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Olaf Helper 42,561 Reputation points
    2024-06-19T05:51:19.7066667+00:00

    by using script task ... The script should be in C#.

    Why do you want to make things more complicated then necessary?

    Are you firm in programming in .NET / C#? I guess not, otherwise you would ask for easy/common things like database access in C#.

    Better use standard dataflow task in SSIS.

    0 comments No comments