How to Use Variables in Script Task in SSIS Package (C# and VB NET Scripting Language) - SQL Server Integration Services(SSIS) Tutorial

In this video we will learn about usage of variables in Script Task in SSIS Package

How to create variables in SSIS Package
How to use variables as ReadOnlyVariables and ReadWriteVariables in Script Task
How to set the value of variable from Script Task in SSIS Package



How to use Variables in Script Task in SSIS Package by using C# Scripting Language

    public void Main()
        {

//Set the value of local variables in SSIS Script from SSIS Variables
            string FileName;
            string FolderPath;

            FileName=Dts.Variables["User::FileName"].Value.ToString();
            FolderPath = Dts.Variables["User::SourceFolder"].Value.ToString();
            

//Set the Value of variable from Script Task in SSIS Pacakge
 Dts.Variables["User::FileFullPath"].Value = FileName + FolderPath + "I have set value";
            MessageBox.Show(Dts.Variables["User::FileFullPath"].Value.ToString());
            Dts.TaskResult = (int)ScriptResults.Success;
        }

How to use Variables in Script Task in SSIS Package by using VB NET Scripting Language

   Public Sub Main()
        Dim filename As String
        Dim SourceFolder As String
'Set the value of local variables in SSIS Script from SSIS Variables
        filename = Dts.Variables("User::FileName").Value.ToString()
        SourceFolder = Dts.Variables("User::SourceFolder").Value.ToString()


'Set the Value of variable from Script Task in SSIS Pacakge
        Dts.Variables("User::FileFullPath").Value = SourceFolder + filename
        MessageBox.Show(Dts.Variables("User::FileFullPath").Value.ToString())
        ' Add your code here
        '
        Dts.TaskResult = ScriptResults.Success
    End Sub


How to use Variables in Script Task in SSIS Package by using C# or VB.NET Scripting Language



    Related Posts/Videos on Script Task    


48 comments:

  1. Thank you for sharing your blog which enhances our knowledge and students career sector. I want to aware you towards our Online Education platform, content is valuable, it help in developing knowledge it’s too worthy
    rpa training in chennai

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. makeup academy in bangalore : GlossNGlass is a Top Makeup Studio & Academy in bangalore. We have best bridal makeup in bangalore with price ✓Professional Makeup artists in Bangalore ✓ Bridal makeup in Bangalore ✓Makeup Courses in Bangalore Best Prices

    Visit: makeup classes in bangalore


    makeup artist courses
    Makeup Courses. Intensive Pro Makeup & Basic Hair Course. Advanced Pro Makeup, Hairstyling & Saree Course. Bridal Makeup Course in Bangalore. Professional Makeup Classes in Bangalore. Basic Hairstyling Courses in Bangalore. Advanced Hairstyling & Design. Advanced Saree Draping. Makeup Courses in Bangalore.

    Visit:professional bridal makeup artist

    ReplyDelete
  4. Seo services in Bangalore : Best SEO Companies in Bangalore: Hire Digimark Agency, best SEO Agency in Bangalore who Can Boost Your SEO Ranking, guaranteed SEO Services; Free SEO Analysis.

    Seo agency : Digital Marketing Company In Bangalore: DigiMark Agency is one of the Best Digital Marketing companies in Bangalore. Ranked among the Top digital marketing agencies in Bangalore. SEO Company.

    Seo company : Social Media Marketing company in Bangalore: DigiMark Agency is one of the Best Social Media Marketing agency in Bangalore which provides you the right services.

    Seo agency in Bangalore : PPC Company in Bangalore: Digimark Agency is one of the best PPC services provider in Bangalore. This one of the best service if you want quick ROI.

    ReplyDelete
  5. Acharya Institute of health sciences is one of the best colleges in Bangalore for Master in Hospital Administration(MHA) course.Get a masters degree in hospital Administration from the best college in Bangalore. Affiliated to Rajiv Gandhi University of Health Sciences and approved by Govt. of Karnataka, IAP, INC & KNC.
    Visit: hospital management course in bangalore
    Acharya Institute of health sciences is one of the best colleges in Bangalore for Bachelors in Radiology and Medical Imaging Technology(MIT). Acharya offers best course of B.Sc. MIT. Affiliated to Rajiv Gandhi University of Health Sciences and approved by Govt. of Karnataka, IAP, INC & KNC.
    Visit: bsc mit colleges in bangalore
    Acharya Institute of health sciences is one of the best colleges in Bangalore for Bachelor of Physiotherapy course. Ranked in top BPT colleges in Bangalore.Affiliated to Rajiv Gandhi University of Health Sciences and approved by Govt. of Karnataka, IAP, INC & KNC.
    Visit: Bachelor of Physiotherapy course
    Acharya Institute of health sciences is one of the best colleges for M.Sc. nursing in Bangalore.Ranked among top 10 nursing colleges, offering Post B.Sc nursing courses in Bangalore. Affiliated to Rajiv Gandhi University of Health Sciences and approved by Govt. of Karnataka, IAP, INC & KNC.
    Visit: Post BSc nursing colleges in Bangalore

    ReplyDelete
  6. MAAC provides best hair fall treatment in Bangalore one-stop solution to all hair related worries with a team of highly skilled and trained experts. MAAC ensures all the precautions of safety and service are looked into. Maac provides the best hair transplantation facility that is both effective and does not burn a hole in your pockets. MAAC is one of the best hair transplant clinic in bangalore undertaking various types of hair transplantations like the FUE (Follicular unit extraction) and FUT (follicular unit strip surgery) as well as the Direct Hair Transplantation and the Synthetic Hair Transplantation.
    visit: hair treatment in bangalore

    ReplyDelete
  7. Makeup categories, skilled Makeup Course | Makeup Academy, makeup courses Academy makeup courses categories, Makeup College. the necessity to feel stunning and younger is increasing and latest trends are becoming introduced each currently and so. Career Opportunity: On the in completion in fact in Makeup creator, Fashion Makeup creator, Media creator, Makeup adviser, Makeup Trainer, Color Cosmetic consultant, Freelancer. VLCC Institute Makeup Courses offers you the platform to become knowledgeable Makeup creator by learning from the most effective within the Beauty business.

    ReplyDelete
  8. Prp Treatment in Bangalore: MAAC has an expertise in Hair fall treatment, with years of experience in PRP for hair loss, our experts provide the best hair loss treatment in bangalore.

    prp hair loss treatment in bangalore

    ReplyDelete
  9. Best Treatment for Pigmentation : Cosmelan therapy ‘s principal action is the elimination of melanin patches on the face, Maac provides the best treatment for Pigmentation of face through various treatments .

    pigmentation treatment in Bangalore

    ReplyDelete
  10. Thank you for sharing. Your blog posts are interesting and informative. I think many people like it and visit it regularly, including me.
    Tayloright New York City

    ReplyDelete
  11. LifeVoxel AI - Best Medical Imaging Platform also Provide critical patient-centric delivery of care using intuitive, diagnostic and instantly accessible visualizations over the Internet. 

    RIS PACS
    RIS PACS Software

    ReplyDelete
  12. Find Best Cosmetic Surgeon in your preferred location Based on Rating, Reviews and Required information

    https://medcontour.org

    ReplyDelete
  13. Find Best Cosmetic Surgeon in your preferred location Based on Rating, Reviews and Required information


    Dr MedContour.org

    ReplyDelete
  14. VLCC Institute Makeup Courses give you the platform to become a Professional Makeup Artist by learning from the best in the Beauty Industry. Our state-of-the-art Makeup Classes will walk you through everything that goes into establishing a successful career in this fun, fast-paced and fabulous industry.

    ReplyDelete
  15. Today everyone wants to rank on Google. Do you want your business number one on Google?
    Come and visit Best SEO Company in Bangalore That will help you to increase your visibility on Google.

    ReplyDelete
  16. Do you need to promote and advance your business online? Piama Media Labs is the Best SEO Company in Bangalore. That will help you to increase your visibility on Google.

    ReplyDelete
  17. nice blog
    Great Information.
    #makeupCourse #NutritionCourse #HairCourse #SpaCourse #CosmetologyCourse #NailCourse #AestheticsCourse
    Makeup Course

    ReplyDelete
  18. Thanks for sharing Very great Blog
    We are manufacturing the best thermal paper rolls in Bangalore and thermal ribbon rolls in Bangalorewith with the best quality paper material.
    barcode label rolls in Bangalore

    ReplyDelete
  19. SAP ABAP Training in Bangalore with 100% placement. We are the Best SAP ABAP Training Institute in Bangalore. Our SAP ABAP courses are taught by working professionals who are experts in.

    sap abap training in bangalore

    sap abap courses in bangalore

    sap abap classes in bangalore

    sap abap training institute in bangalore

    sap abap course syllabus

    best sap abap training

    sap abap training centers

    ReplyDelete

  20. Artificial Intelligence AI Course in Bangalore with 100% placement. We are the Best Artificial Intelligence AI Course Institute in Bangalore. Our Artificial Intelligence AI course and Certification courses are taught by working professionals who are experts in Artificial Intelligence AI.

    Artificial Intelligence AI Training in Bangalore

    Artificial Intelligence AI course in bangalore

    Artificial Intelligence AI in bangalore

    Artificial Intelligence AI classes in bangalore

    Artificial Intelligence AI course institute in bangalore

    Artificial Intelligence AI course and Certification course syllabus

    best Artificial Intelligence AI course

    Artificial Intelligence AI course centers

    ReplyDelete
  21. Nice Post!
    Thanks for sharing great information.
    If you want the best Hair Transplant In Chennai then you can visit the Profile cosmetic surgery centre. Our centre offers the best hair loss treatment at the best prices with the best results.
    Best Hair Transplant Clinic In Hyderabad
    Best Hair Transplant In Hyderabad
    Hair Transplant Cost In Hyderabad

    ReplyDelete
  22. Thank you so much for providing information about SSIS and other utilities.I really feel that their is a need to utilise more of its aspects.

    SSIS Upsert

    ReplyDelete
  23. Best digital marketing agency in bangalore

    ReplyDelete
  24. Thanks for sharing and really good post.
    We are supplying best billing machine for restaurant,hotel, retail shop and restaurant. For more information please visit below link.
    Billing Machine in Bangalore

    ReplyDelete
  25. Nice Blog
    Great Information.
    Makeup Course
    #makeupCourse #NutritionCourse #HairCourse #SpaCourse #CosmetologyCourse #NailCourse #AestheticsSkinCourse

    ReplyDelete
  26. First of all I would like to thank you for writing this post I love both writing and reading new posts and I was just looking at new posts to see me something new, only then I saw your post and the rest of the post is praiseworthy.
    sofeeya.com

    ReplyDelete
  27. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all.


    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery




    ReplyDelete
  28. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all.


    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery


    ReplyDelete
  29. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science In Banglore With Placements
    Data Science Course In Bangalore
    Data Science Training In Bangalore
    Best Data Science Courses In Bangalore
    Data Science Institute In Bangalore

    Thank you..

    ReplyDelete
  30. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science In Banglore With Placements
    Data Science Course In Bangalore
    Data Science Training In Bangalore
    Best Data Science Courses In Bangalore
    Data Science Institute In Bangalore

    Thank you..

    ReplyDelete
  31. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.

    SAP HCM Online Training

    SAP HCM Classes Online

    SAP HCM Training Online

    Online SAP HCM Course

    SAP HCM Course Online

    ReplyDelete
  32. I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.

    SAP HANA Online Training

    SAP HANA Classes Online

    SAP HANA Training Online

    Online SAP HANA Course

    SAP HANA Course Online

    ReplyDelete
  33. I have recently visited your blog profile. I am totally impressed by your blogging skills and knowledge.

    RPA Training in Bangalore

    Best RPA Training Institutes in Bangalore

    ReplyDelete