Solved

Ask a fundamental question about Script Component

Posted on 2011-02-13
3
534 Views
Last Modified: 2012-05-11
Dear All,

I try to create a very simple script component. When I go to "Script-->Edit Script...", it lauches Visual Studio and automatically creates 1 project with 3 files:


bufferwrapper.cs
componentwrapper.cs
main.cs


It seems only the last file is for me to modify. But even if I directly build this project, I got compilation error, complaining about errors in "bufferwrapper.cs" class, which is so strange... and error is actually here:


    public String class
    {
        get
        {
            return Buffer.GetString(BufferColumnIndexes[20]);
        }
    }

If I change name from "Class" to "Class2", then it's fine.

Could anyone please help?

Thanks heaps in advance!


0
Comment
Question by:chenyuhao88
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
mkobrin earned 500 total points
ID: 34885704
class is a reserved name in C#, that is why it accepts class2, which is not a reserved name.
0
 

Author Comment

by:chenyuhao88
ID: 34893784
mkobrin,

You answer could be a perfect. But does that mean it is a flaw in SSIS? As the code is auto-generated by Visual Studio, if it's C# then it should not give me such a name by default......


0
 

Author Closing Comment

by:chenyuhao88
ID: 34903619
Thanks a lot!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question