Programmatically creating Transformation Script Component

Does anyone have any examples of programmatically creating a Transformation Script Component (or Source/Destination) in the dataflow?  I have been able to create other Transforms for the dataflow like Derived Column, Sort, etc. but for some reason the Script Component doesn't seem to work the same way.
I have done it as below trying many ways to get the componentClassId including the AssemblyQualifiedname & the GUID as well.  No matter, what I do, when it hits the ProvideComponentProperties, it get Exception from HRESULT: 0xC0048021
IDTSComponentMetaData90 scriptPropType = dataFlow.ComponentMetaDataCollection.New();
scriptPropType.Name = "Transform Property Type";
scriptPropType.ComponentClassID = "DTSTransform.ScriptComponent";
// have also tried scriptPropType.ComponentClassID =typeof(Microsoft.SqlServer.Dts.Pipeline.ScriptComponent).AssemblyQualifiedName;
scriptPropType.Description = "Transform Property Type";
CManagedComponentWrapper instance2 = scriptPropType.Instantiate();
instance2.ProvideComponentProperties();
Any help or examples would be greatly appreciated!  Thanks!

I am working on the creating script component programmatically.
The code has been created is shown in the following,
Dim SourceCodeValue(3) As String
Dim scriptPropType As PipeLineWrapper.IDTSComponentMetaData90 = _
CType(CType(dataflowTask, TaskHost).InnerObject, PipeLineWrapper.MainPipe).ComponentMetaDataCollection.New()
scriptPropType.Name = "Transform Property Type"
scriptPropType.ComponentClassID = "{BF01D463-7089-41EE-8F05-0A6DC17CE633}"
scriptPropType.Description = "Transform Property Type"
Dim instance2 As PipeLineWrapper.CManagedComponentWrapper = scriptPropType.Instantiate()
instance2.ProvideComponentProperties()
SourceCodeValue(0) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
"/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & ".vsaproj"
SourceCodeValue(1) = My.Resources.ScriptComponentProjFile
SourceCodeValue(2) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
"/ScriptMain.vsaitem"
SourceCodeValue(3) = My.Resources.ScriptComponentCode
Dim anIDTSDesigntimeComponent90 As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90 = _
CType(instance2, Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90)
anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", SourceCodeValue)
anIDTSDesigntimeComponent90.SetComponentProperty("PreCompile", False)
When debugger reach to “anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", scriptValue)”, NullReferenceException. “Use the “New” keyword to create an object instance” was shown.
Could you please give me some help or suggestion?
Thank you so much in the advance

Similar Messages

  • Editing Script Component in VS2013 launches VS2012?

    New SSIS developer here.
    Using VS Premium 2013 RTM (12.0.21005.1 REL) with SSDT 12.0.30919.1 and SQL Server Integration Services.
    I have a Business Intelligence -> Integration Services project (an SSIS project), and when I create a Script Component in a Data Flow Task and click "Edit Script...", it launches Visual Studio 2012.
    The ScriptLanguage property for the Script Component is set to "Microsoft Visual C# 2012". I don't see an option for "Microsoft Visual C# 2013" (if such a thing exists?).
    Questions:
    1. How can I set VS2013 to call VS2013 (and NOT VS2012) for editing the C# in my Script Component? I can create/edit/build a straight C# project just fine in VS2013, so how to do I get VS2013 to edit C# in the Script Component instead of launching VS2012?
    2. What is the relationship between the version of Visual Studio ("Visual Studio 2013") and the version of the languages available/defaulted in the ScriptLanguage setting ("Microsoft Visual C#/Visual Basic 2012")?
    Thank you very much for your help.

    Answer:
    You cannot as the Script Task is done via VSTA which is VS 2012 Shell. And there is not such need;
    Arthur
    MyBlog
    Twitter

  • Assigning Null to a variable in SSIS script component task

    Hi,
    I have created a script component task has codes like the one below.
    If Row.SessionKey is null, how do I assign it to _prevSessionKey? Currently, I am receiving column reference is null error.
    Please help!
    publicclassScriptMain : UserComponent
    { int _prevSessionKey;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.Event == 5)
    _prevSessionKey = Row.SessionKey;
    cherriesh

    you can make it like this
    publicclassScriptMain : UserComponent
    { int _prevSessionKey;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.Event == 5)
    _prevSessionKey = (Row.SessionKey_IsNull? <your default value here> : Row.SessionKey);
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Programmatically creating iBots

    We are use OBIEE to display reports on an external-facing site using an IFrame'd Go URL and would like the ability to notify users by email when a certain report contains data based on a user defined thresholded value (e.g., if sales for a particular item go above %200)
    Normally this could be done by having the user use Answers to create their own filtered report, have them create an iBot, etc. I was curious if there was a way to programmaticly create the customized reports/iBots of if there was another way of doing this? I'm making the assumption that I'll have to create the UI that takes in the threshold value, which would then be passed on to OBIEE.
    thanks

    I am working on the creating script component programmatically.
    The code has been created is shown in the following,
    Dim SourceCodeValue(3) As String
    Dim scriptPropType As PipeLineWrapper.IDTSComponentMetaData90 = _
    CType(CType(dataflowTask, TaskHost).InnerObject, PipeLineWrapper.MainPipe).ComponentMetaDataCollection.New()
    scriptPropType.Name = "Transform Property Type"
    scriptPropType.ComponentClassID = "{BF01D463-7089-41EE-8F05-0A6DC17CE633}"
    scriptPropType.Description = "Transform Property Type"
    Dim instance2 As PipeLineWrapper.CManagedComponentWrapper = scriptPropType.Instantiate()
    instance2.ProvideComponentProperties()
    SourceCodeValue(0) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
    "/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & ".vsaproj"
    SourceCodeValue(1) = My.Resources.ScriptComponentProjFile
    SourceCodeValue(2) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
    "/ScriptMain.vsaitem"
    SourceCodeValue(3) = My.Resources.ScriptComponentCode
    Dim anIDTSDesigntimeComponent90 As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90 = _
    CType(instance2, Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90)
    anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", SourceCodeValue)
    anIDTSDesigntimeComponent90.SetComponentProperty("PreCompile", False)
    When debugger reach to “anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", scriptValue)”, NullReferenceException. “Use the “New” keyword to create an object instance” was shown.
    Could you please give me some help or suggestion?
    Thank you so much in the advance

  • Script Component - variables locked for read and write not available outside of post execute

    Hello,
    I have two Data flow task,
    Frist one has OLE DB Source and Script Component as Transformation
    I have package level variable called AllSiteIds
    In first DFT, i have a local varibale that is declared before PreExecute method and after ScriptMain:UserComponent line.
    This local variable is used in Input process method to concatenate the one of the row values like below
    SiteId = SiteId + Row.SID.ToString()+",";
    The package level variable AllSiteIds is set for ReadWrite on script component.
    In my post execute i am setting package level variable AllSiteIds
    Variables.AllSiteIds = SiteId;
    In my second DFT, i have OLEDB source and Script transformation and i am accessing the package level variable AllSiteIds in Preexcute but not able to do so and getting error mentioned in subject.
    My goal is to create string of all SiteIds delimited by comma and have it available in second DFT to be used in Preexcute.
    The sql command i am using to get all unique siteid's is
    Select SiteId from dbo.Services
    Group By SiteId
    Order By SiteId
    Using the result from above i need to create comma delimited string of all site ids' and store it in variable so i can use it in pre excute of second DFT.
    Please suggest on how to accomplish above?

    If all you want is to generate a string of ids then you can simply use a Execute sql task for this and use a query based on FOR XML PATH which will generate the string of ids
    http://visakhm.blogspot.in/2014/01/rowset-concatenation-with-special.html
    then inside execute sql task set resultset option as single row and store the result ina SSIS varaiable of type string.
    Once this is done you can then use this variable inside the subsequent data flow task 
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Advice for custom transformation script to change table FK Associations

    Hello,
    I am attempting to write a transformation script that will cycle through tables in a large model and modify some
    FK associations to change the remote table in the FK. As an aside, the reason for this is that our logical model
    has logical entities that represent many small lookup code domains. However our relational/physical model has a
    single utility code repository physical table which contains all these code domains. So part of the transformation
    from our logical model to relational model is to swing all the FK associations for these lookup code domains
    into the common code table. Then the tables representing the lookup domains can be hard deleted.
    In any case, I'm looking at the
    oracle.dbtools.crest.model.design.relational.FKIndexAssociation
    or the
    oracle.dbtools.crest.model.design.relational.Index
    to see if one of these can be manipulated to perform the transformation I want to accomplish.
    When I perform the equivalent process manually via property sheets there are several ways of accomplishing this.
    a) The neatest method seems to be to modify the existing FK in place by clicking on the FK in the relational diagram and then changing
    the property called 'PK / UK Index'. Change that to the PK of the utility code repository table that is replacing the original
    table (representing the lookup domain). A side effect of this results in the mapping of the FK
    columns being nulled out. So they need to be remapped to the original columns (which are retained).
    So in two steps the existing FK is detached from the original table, reattached to the new table and then
    the FK columns are reused in place for the new FK mapping.
    b) The brute force method is to delete the original FK and then create an entirely new FK to the new table. There are
    multiple dialogs which allow you to retain the original FK columns and reuse them in the new FK.
    I realize this is a somewhat complex transformation but I'd appreciate some algorithmic advice on which path to take
    to try to accomplish this. In particular, is there a scripting equivalent to the first process above?
    I don't even know if the FK that is represented on the relational diagram is represented by the FKIndexAssociation or Index
    class in the scripting object model. In other words, as I loop through the tables in the relational model what would be my
    starting point:
    fks = table.getFKAssociationsList();
    or
    fkIndexes = table.getAllInds_FKeyInds();
    or something else. The names of the properties in the user interface don't always match with the scripting properties so
    it's a little tricky to figure this stuff out.
    Once I get access to the object that is equivalent to the FK in the diagram/property sheet, what
    is the best way to manipulate it via scripting. How can I change the parent/remote end of the FK to point to the new table.
    Or if I have to delete the original FK and then recreate it - is there a way to save the original FK columns and reuse them
    while creating the new FK?
    One other question. What is the best way to delete tables from a relational model. I note that there is an undocumented (?) remove()
    method that is available on Table. It is probably on a superclass so other things can be removed as well.
    When I try to use this method in a loop the script throws up dialogs similar to the dialogs that appear while performing a delete
    manually via the UI. Is there any way to intercept and respond to the dialogs programmatically?
    So for instance if I get a dialog popup like
    Do you want to delete generated FK columns 'FOO' in table 'BAR'?
    is there a way to intercept that dialog in the script and then answer Yes or No to it via the script?
    If it turns out to be too difficult to perform this type of transformation via scripting the fallback
    is to perform the transformation on the generated DDL file. But it would be cleaner to be able
    to perform the transformation in the DM Relational model if possible.
    Any advice appreciated.
    Rgds, BP

    Philip,
    This is good info. I was able to get a rough version of my transformation script to work.
    However I'd like to clean it up a bit.
    In your notes it is not clear how the FKIndexAssociation and associated Index are related.
    Is there a getter on FKIndexAssociation that references the associated Index?
    It looks like the method fk.changeKeyObject() takes an Index object as its first parameter.
    What would be the cleanest way to extract the PK Index from the Code table that I want
    to point to? I used something like:
    cdTable = model.getTableSet().getByName("CD_REPOSITORY");
    cdPkIndex = cdTable.getIndexByName("CD_REPOSITORY_PK");
    I used the latter method because it's the only one that returns an object of type Index
    which is required as input to FKIndexAssociation.changeKeyObject(). However this method
    requires the name of the index. That's fine but I'd like to just grab the PK's supporting index
    directly if possible (without knowing the name).
    I'm curious if there is a getter on Table or FKIndexAssociation that can just grab the index of the PK of
    a table directly?
    I don't see such a getter on FKIndexAssocation. On the Table class there are many getters that might be
    of some use but the only one I could get to work was getIndexByName() as shown above.
    I tried to use getIndexes() and then use isPk() on the result of that in a loop but that didn't return any result.
    It looks like getters getIndexes(), getPKs(), getUKeys() return collections of DesignObject which are just the
    superclass of FKIndexAssociation which is not what I need (i.e. which IS the actual underlying Index object).
    So I guess the general question is what is the best way to get access to the Index objects in two scenarios.
    First for the PK and UKs (typically on the 'parent-referenced' table) and secondly for FKs (typically on the 'child-referencing' table).
    If I were imagining how this would work I would imagine getters on the Table for the former and a getter
    on the FKIndexAssociation for the latter. But that's not how it works.
    Also, as an aside - this 'Index' is somewhat confusing since these seem to be 'potential indexes' and not true database indexes.
    These 'indexes' seem to be more closely related to database constraints and not actual indexes. I know that Primary Keys are
    implemented in Oracle via a unique index but I'd like to confirm that the class
    oracle.dbtools.crest.model.design.relational.Index
    is not the same thing as a DDL database Index.
    Secondary question. I notice when I run the script which loops through all the tables and redirects the FKs - the
    diagram does not refresh. I had to save the model and then reload it for the graphical representation
    of the FKs to change and redirect to the new table.
    Is there a way to force the refresh to occur right away?
    I've noticed that other transformation scripts I've written HAVE resulted in the diagram being refreshed
    right away (even while the script is running). In this case it does not.
    Rgds, BP

  • Assigning value to a variable in Script Component.

    I'm pretty new to SSIS development and need to figure out a problem with assigning a value to a user defined variable. I created a pretty simple package. It reads a flat file, extracts date from a header record and subsequently uses derived column component
    to reformat data to the desired output format. One of the columns (FileRunDate,
    string, length 8) in the derived component is defined as a string and in the expression I'm assigning it to a variable I set earlier in the script component -
    @[User::vRunTimeDate]. When the process runs, the output file gets generated, however FileRunDate reflects
    originally set varible's value. It seems that the variable assignment in the script task does not work, even though in the debug mode, I do see how the value is being set. The variable has an attribute of ReadWrite. Is it due to the fact that the value is
    being set in the same workflow?
    Any feedback is greatly appriciated.

    Unfortunately I'm unable to add a screenshot of the process, for some reason I get an error message when I try to do that. In a nutshell the entire workflow consist of flat file source component, following by a script component (this is where I read and
    assign the variable) 
        public override void PostExecute()
            IDTSVariables100 vars;
            base.PostExecute();
            // Set run date
            if (strRunDate != null)
                VariableDispenser variableDispenser = (VariableDispenser)this.VariableDispenser;
                variableDispenser.LockForWrite("User::vRunTimeDate");
                variableDispenser.GetVariables(out vars);
                // Set the variable
                vars["User::vRunTimeDate"].Value = strRunDate;
                //Unlock the variable 
                vars.Unlock();
                //Variables.vRunTimeDate = strRunDate;
    then goes conditional split ( filtering out unwanted records), which is connected to a derived column component (this is where one of the columns get assigned a variable's value), one more script component (this where I identify
    specific data element and do a replace command) and finally flat file destination.
    BTW, the article in the provided URL clearly states that variable won't reflect assigned value till the entire workflow has finished. If that's the case, then I think I know my
    answer. Is there is such a thing as putting execution of different steps in a different step, so anything executed subsequently will see that value?

  • WDRuntimeException : Failed to create delegate for component

    Hi Friends,
    I encountered the following error while deploying the application to local DC. Actually, i'm trying to create a new view 'HCFileUploadView' in the existing application.
    An error has occurred:
    "Failed to process the request."
    Please contact your system administrator.
    Hide details
    Web Dynpro client:
    HTML Client
    Web Dynpro client capabilities:
    User agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322), version: null, DOM version: null, client type: msie6, client type profile: ie6, ActiveX: enabled, Cookies: enabled, Frames: enabled, Java applets: enabled, JavaScript: enabled, Tables: enabled, VB Script: enabled
    Web Dynpro runtime:
    Vendor: SAP, Build ID: 6.4011.00.0000.20050217164947.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:49:12[UTC], changelist=329752, host=PWDFM026)
    Web Dynpro code generators of DC local/CRRSRatingWDP:
    SapDictionaryGenerationCore: 6.4011.00.0000.20050127161623.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:34:47[UTC], changelist=324383, host=PWDFM026.wdf.sap.corp)
    SapMetamodelWebDynpro: 6.4011.00.0000.20050121170001.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:38:14[UTC], changelist=322883, host=PWDFM026.wdf.sap.corp)
    SapMetamodelCore: 6.4011.00.0000.20050121165648.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:28:49[UTC], changelist=322878, host=PWDFM026.wdf.sap.corp)
    SapWebDynproGenerationTemplates: 6.4011.00.0000.20050217164947.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:53:22[UTC], changelist=329752, host=PWDFM026)
    SapWebDynproGenerationCTemplates: 6.4011.00.0000.20050217164947.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:53:22[UTC], changelist=329752, host=PWDFM026)
    SapGenerationFrameworkCore: 6.4011.00.0000.20041104141254.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:28:00[UTC], changelist=298452, host=PWDFM026.wdf.sap.corp)
    SapIdeWebDynproCheckLayer: 6.4011.00.0000.20050215134310.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:42:02[UTC], changelist=329103, host=PWDFM026.wdf.sap.corp)
    SapMetamodelDictionary: 6.4011.00.0000.20040609163924.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:32:12[UTC], changelist=253570, host=PWDFM026.wdf.sap.corp)
    SapMetamodelCommon: 6.4011.00.0000.20050121165648.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:28:59[UTC], changelist=322878, host=PWDFM026.wdf.sap.corp)
    SapWebDynproGenerationCore: 6.4011.00.0000.20050215134310.0000 (release=630_VAL_REL, buildtime=2005-02-20:21:42:32[UTC], changelist=329103, host=PWDFM026.wdf.sap.corp)
    SapDictionaryGenerationTemplates: (unknown)
    Web Dynpro code generators of DC sap.com/tcwddispwda:
    No information available
    Web Dynpro code generators of DC sap.com/tcwdcorecomp:
    No information available
    J2EE Engine:
    No information available
    Java VM:
    Java HotSpot(TM) Server VM, version: 1.4.2_06-b03, vendor: Sun Microsystems Inc.
    Operating system:
    Windows XP, version: 5.1, architecture: x86
    Error stacktrace:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component com.mbb.crrs.web.webdynpro.component.DefaultRatingController. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:38)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doInit(ClientComponent.java:775)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:329)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:349)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:599)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
         ... 26 more
    Caused by: java.lang.ExceptionInInitializerError
         at com.mbb.crrs.web.webdynpro.component.wdp.InternalDefaultRatingController.<init>(InternalDefaultRatingController.java:192)
         ... 31 more
    Caused by: com.mbb.crrs.common.exceptions.ApplicationConfigurationException: Cannot load System Properties.
         at com.mbb.crrs.common.SystemContext.<init>(SystemContext.java:39)
         at com.mbb.crrs.common.SystemContext.getInstance(SystemContext.java:47)
         at com.mbb.crrs.common.LoggerFactory.getLogger(LoggerFactory.java:60)
         at com.mbb.crrs.web.webdynpro.component.DefaultRatingController.<clinit>(DefaultRatingController.java:737)
         ... 32 more
    Please help me on this issue.
    Thanks && Regards,
    Vijay.

    Hello!
    I face the same problem with Failed to create delegate for component:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component
    XXX.YYY.ZZZ..ume.Ume. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Caused by: java.lang.reflect.InvocationTargetException
    Caused by: java.lang.NoClassDefFoundError: com.sap.tc.webdynpro.model.webservice.gci.WSTypedModelClass
    I think this started after upgrading from 7.01 SP3 to SP5, but I'm not sure.
    What was it that solved your issue?
    *I found the error. My ProjectProperties.wdProperties did not contain the references it needed.*
    Edited by: Richard Linnander on Nov 23, 2009 2:33 PM

  • SSIS script component to use defined connection manager to load data from a Oracle

    In SSIS script compoment, I can connect to oracle with hard-coded connectionstring:
    OracleConnection conn;
    conn = new OracleConnection();
    conn.ConnectionString = "Data Source=XE;User ID=hr;Password=******";
    however, when I defined an connection managers in the script compoment and call it as follows:
        IDTSConnectionManager100 connMgr;
        OracleConnection conn;
        public override void AcquireConnections(object Transaction)
            connMgr = this.Connections.MyADONETConnectionManager;
            conn = (OracleConnection)connMgr.AcquireConnection(null);
    I got error below:
    TITLE: Package Validation Error
    Package Validation Error
    ADDITIONAL INFORMATION:
    Error at Data Flow Task source [Script Component C# Oracel HR Oracle [21]]: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'Oracle.DataAccess.Client.OracleConnection'. Instances of types that represent COM
    components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
       at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.AcquireConnections(Object transaction)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper100 wrapper, Object transaction)
    Error at Data Flow Task source [SSIS.Pipeline]: Script Component C# Oracel HR Oracle failed validation and returned error code 0x80004002.
    Error at Data Flow Task source [SSIS.Pipeline]: One or more component failed validation.
    Error at Data Flow Task source: There were errors during task validation.
     (Microsoft.DataTransformationServices.VsIntegration)
    I did not find any example for Orale. A similar SQL server example is as linked below:
    http://technet.microsoft.com/en-us/library/ms135939(v=sql.110).aspx
    can anybody shed some light? I appreciate it...
    thanks,
    Steve

    You need to create a connectionmanager for Oracle connection and use it within the script task
    See
    http://www.mssqltips.com/sqlservertip/1787/oracle-parameterized-queries-in-sql-integration-services-ssis/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Programmatically create objects and formulas in Crystal Reports XI Developer edition?

    <p>Is it possible to programatically/dynamically create a text, line, formula field object, etc. in Crystal XI Developer edition?  I have been programming with the Crystal .Net reports component that came with VS 2005 for the past 6 months and know for a fact you can&#39;t programmatically create those objects although you can programmatically control their properties.  My intention is to create a dynamic report that can be reused extensively.  My current work-around for this was to create a generic report with about 40 formula field objects which draws data from 40 corresponding formula fields that I can programmatically set it&#39;s formula thus imitating a report field.  I want to update to the developer edition because I heard with this edition we can programmatically create and manipulate these objects but I found no reference or examples anywhere that proves we can do this?  Does anyone know for a fact or point me to the right place to look for documentation?  TIA</p>

    Hi,
    How can I programmatically refresh list of values status on CR server XI R2?
    Currently, after I modified the data source in the data connection, some of the LOVs in the report prompt window became empty when I tried to generate the report. I have to use Business View Manager to log onto the Crystal reports server XI R2, find and double click the list of values object to bring up the Edit LOV window, and then click on "Refresh Status" button to make the LOV available in the report prompt window.
    What SDK should I use to create a simple application (preferable a desktop application) to find all LOV objects on CR server XI R2 and to refresh their status? That is an application similar to the "Refresh Status" function in Business View Manager.
    I found Report Engine SDK has the Lov.Refresh function to refresh LOV. On the other hand, Report Engine SDK seems to be for BusinessObjects Enterprise, not for Crystal Reports Server. Can this or other function achieve what I want, i.e. to refresh list of values status on CR server XI R2? If yes, can I use it to develop a self-contained desktop application instead of a web application? I only need to run this application after I modify the data source in the data connection, so I prefer not need to deploy it as a web service.
    Thanks for your help.
    C.T.

  • Creating flash cs3 component

    Hi,
    There is great and easy way to create flash based component
    in flash cs3 using action script 3.0.
    I am going to make a simple My button component which will
    behave likely same as flash native button component.
    You can modify this according your requirement this is just
    you give an idea about how we can go for creating a component in
    flash cs3.
    Follow these steps…
    1. Create a fla file and save this file with any name
    2. Create a movieClip and draw a rectangle shape on first
    frame.
    3. Right click on movieclip in library, select linkage
    4. Provide class name in text field area [MyButton] (you can
    use any name here which should matched with your class)
    5. Click Ok button
    6. Write class [MyButton]
    (you can copy and use this)
    * author @ sanjeev rajput
    * [email protected]
    * A flash action script 3.0 based component without extending
    UIComponent class
    package {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import fl.motion.Color;
    public class MyButton extends Sprite{
    private var _tf:TextField;
    private var _Label:String="My Button";
    private var _bgColor:uint=0xCCCCCC;
    private var _rollOverColor:uint=0xFFCCCC;
    private var _borderColor:uint=0x000000;
    private var _borderThickness:int=1;
    private var _width:Number = 100;
    private var _height:Number =100;
    private var _background:Sprite;
    public function MyButton() {
    init();
    createChildren();
    initEventListeners();
    draw();
    //-------------property section [Start]
    [Inspectable]
    public function set Label(lbl:String){
    _Label=lbl;
    draw();
    public function get Label(){
    return _Label
    [Inspectable]
    public function set bgColor(color:uint):void{
    _bgColor=color;
    draw();
    [Inspectable]
    public function set borderColor(color:uint):void{
    _borderColor=color;
    draw();
    [Inspectable]
    public function set borderThickness(thickness:int):void{
    _borderThickness=thickness;
    [Inspectable]
    public function set rollOverColor(color:uint):void{
    _rollOverColor=color;
    //-------------property section [End]
    private function init():void {
    trace('welcome');
    _width = width;
    _height = height;
    scaleX = 1;
    scaleY = 1;
    removeChildAt(0);
    private function initEventListeners():void{
    addEventListener(MouseEvent.MOUSE_OVER, eventHandler);
    addEventListener(MouseEvent.MOUSE_OUT, eventHandler);
    private function eventHandler(event:Event):void{
    if(event.type == MouseEvent.MOUSE_OVER){
    toggleColor(_rollOverColor);
    if(event.type == MouseEvent.MOUSE_OUT){
    toggleColor(_bgColor)
    private function createChildren():void {
    _background = new Sprite();
    _tf = new TextField();
    _tf.autoSize = "center";
    _tf.selectable=false;
    addChild(_background);
    addChild(_tf);
    protected function draw():void {
    toggleColor(_bgColor);
    _tf.text = _Label;
    _tf.x = Math.floor((_width - _tf.width)/2);
    _tf.y = Math.floor((_height - _tf.height)/2);
    //width = _tf.width;
    private function toggleColor(color:uint):void{
    _background.graphics.clear();
    _background.graphics.beginFill(color, 1);
    _background.graphics.lineStyle(_borderThickness,
    _borderColor, 1);
    _background.graphics.drawRoundRect(0, 0, _width, _height,
    10, 10);
    _background.graphics.endFill();
    public function setSize(w:Number, h:Number):void {
    _width = w;
    _height = h;
    draw();
    7. Now right click again on your movieclip in library and
    select component definition.
    8. In class name text field provide same class name
    [MyButton]
    9. Click on ok button
    10. Right click again on movieClip in library and select
    Export SWC file.
    11. Same your exported SWC file in (For window only)
    [c:\Documents and Settings\$user\Local Settings\Application
    Data\Adobe\Flash CS3\en\Configuration\Commands\
    12. Now just open another new flash file open component
    panel/window reload component you will your component in component
    panel with MyButton name.
    13. Drag your custom component on stage provide inputs form
    property window and text it.
    Enjoy!

    Lt.CYX[UGA] wrote:
    > if anyone is using Flash CS3, try creating a flash
    movie, using the FLVPlayer
    > component to play an flv video and make it an executable
    projector. Run it
    > fullscreen and watch how the screen just stays black
    when the video should
    > appear. If you stay windowed, it works fine.
    >
    >
    steps to reproduce:
    > 1. create flash movie
    > 2. put an FLVPlayer component on a frame that's not the
    first (for testing
    > purposes)
    > 3. before the projector reaches the frame with the
    FLVPlayer component, change
    > it to fullscreen (by script or CTRL+F)
    >
    >
    observed behaviour:
    > not only the video doesn't play, but the whole screen is
    black until the
    > player goes back to windowed mode
    >
    >
    expected behaviour:
    > video should play
    >
    >
    remarks:
    > if you skip step 3, video plays correctly
    >
    Works just fine.
    Made new movie, on frame 2 places Full screen action, on
    frame 5 placed video component
    and stop(); action attached to frame. Projector pops large
    following by video playing
    just fine.
    I tried variety, first frame, many frames, all on one. Not
    able to reproduce your problem.
    Works on first go.
    Best Regards
    Urami
    Beauty is in the eye of the beer holder...
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Update and Write Back DataTable in Object Variable Using Script Component

    Hi All..
    I'm trying to update an Object Type Variable [ReadWrite] with a Data Flow Task Script Component. Variable is already holding a record set with Column(s) like, ID, Name, IsProcessed.
    Now in my Data Flow Script Component, I'm trying to 1st) Fill a DataTable with my variables value then 2nd) Loop through each Input Rows in Data Flow Component and accordingly if there is a match of ID then updating IsProcessed Column in DataTable. 3rd &Finally,
    Copy datatable back to Object Type Variable.
    Below is the code used and just for your ref. I tried Printing content of whole DataTable after Update. This looks perfect but not sure why my variable is able to capture it.
    using System;
    using System.Data;
    using System.Data.OleDb;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.Windows.Forms;
    using System.Collections.Generic;
    using System.Text;
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    DataTable dt = new DataTable();
    OleDbDataAdapter adapter = new OleDbDataAdapter();
    List<string> listriuid = new List<string>();
    public override void PreExecute()
    base.PreExecute();
    public override void PostExecute()
    base.PostExecute();
    adapter.Fill(dt, this.Variables.varobjChildPackageLog);
    dt.AcceptChanges();
    foreach (DataRow row in dt.Rows)
    if (listriuid.Contains(row["ID"].ToString()))
    row["IsProcessed"] = "Y";
    // Just to see the Final Data Table Output
    //StringBuilder b = new StringBuilder();
    //foreach (System.Data.DataRow r in dt.Rows)
    // foreach (DataColumn c in dt.Columns)
    // b.Append(c.ColumnName.ToString() + ":" + r[c.ColumnName].ToString());
    //MessageBox.Show(b.ToString());
    this.Variables.varobjChildPackageLog = dt;
    dt.Dispose();
    adapter.Dispose();
    public override void RIUIDInput_ProcessInputRow(RIUIDInputBuffer Row)
    try
    listriuid.Add(Row.ID.ToString());
    catch (Exception ex)
    MessageBox.Show(ex.Message.ToString());
    Regards, Avik M.

    why do you need to do this in script task.
    This is just a matter of using lookup task while you retrive data from source itself to find the matches and use a derived column transform to check and set appropriate value for IsProcessed column. The object variable itself is not required and you dont
    even require a looping statement either!
    If both source and lookup tables are in same server then you can just wrap them inside source sql query itself to do matching and retrieve the value for IsProcessed within select statement itself in OLEDB Source inside data flow.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Sql Developer Data Modeler 3.0 EA1: Custom transformation script

    What is the object model used by:
    Tools -> Design Rules -> Transformations
    From looking at the examples (and guessing) I have managed to create ID attributes on all my entities, but how do I set its sequence number or set it as the primary key?
    entities = model.getEntitySet().toArray();
    for (var e = 0; e<entities.length; e++)
    entity = entities[e];
    att = entity.createAttribute();
    att.setName('ID');
    - Marc de Oliveira

    content of XML files:
    1) class described, parent class if there is one
    2)<property .../>
    describes property - set and get method, data type of property, default value
    3) <collection ... />
    describes collection of objects belonging to class - 5 collections are defined in Table.xml - columns, indexes, table check constraints, column groups and spatial definitions
    - get method - to get collection
    - create item method - method of described class used to create item for that collection; so for columns collection table.createColumn() will create column in table
    - other methods - add, move, remove if are defined
    4)other meta data
    definitions in 1) .. 4) are used by Oracle SQL Developer Data Modeler, so it'll be wrong to modify those xml files
    5)<roproperty ../>
    Data Modeler doesn't parse/process these definitions, we decided to not filter them out however you should not rely that much on them
    6)some junk left
    For each object you can set your own properties and they will be persisted (also included in compare/merge in versioning) together with other information for object - look at "template table" example in transformation scripts. Here are methods you can use:
    void setProperty(String key, String value);
         String getProperty(String key);
         boolean hasProperty(String key);
         boolean hasProperty(String key, String value);
         void removeProperty(String key);
         void clearProperties();
         Iterator getPropertyNames();
    Philip

  • Update Script component on fly

    Hi,
    In my SSIS Project I am using Script component, below is the code.
    I am referring 100 of table using single Data Flow Task, every table have different numbers of column.
    I want to refresh the columns in input column tab with selected in script component transformation.
    as you can see in code the column are static means table have 8 column.
    what if the next table have 10 column .
    I want to do it dynamically on fly.
    Code:-
    Public Class ScriptMain
    Inherits UserComponent
    Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider()
    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
    Dim columnContents As Byte() = UnicodeEncoding.Unicode.GetBytes(Row.Col001 + Row.Col002 + Row.Col003 + Row.Col004 + Row.Col005 + Row.Col006 + Row.Col007 + Row.Col008)
    System.Windows.Forms.MessageBox.Show(columnContents.ToString())
    Dim hash As Byte() = md5.ComputeHash(columnContents)
    Dim hashString As String = Convert.ToBase64String(hash, Base64FormattingOptions.None)
    Row.RowChecksum = hashString
    End Sub
    End Class
    Please help me to achieve my requirement.
    Regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    You can use
    reflection to loop through all input columns in a Script Component.
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter
    Myeah, but I don't think the SSIS data flow will happily change its metadata and input columns each time.
    MCSE SQL Server 2012 - Please mark posts as answered where appropriate.
    If you change meta data in a certain Data Flow then you have to open and close the Script Component to refresh its meta data. Although the data flow itself isn't very dynamic with meta data. You can use reflection in a Script Component to calculate
    a hash for all (input) columns.
    However... using more than 100 of tables in a single Data Flow Task isn't a best practice ;-)
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Scheduling SSIS with Web Reference in Script Component fails.

    I'm using SSIS on an SQL Server 2014 to create invoices in Microsoft Dynamics NAV 2015.
    To create the invoices in NAV I use their Web services via a Script Component.
    The reference is added using "Add Service Reference" - Advanced - "Add Web Reference" all according to the Dynamics NAV documentation. Found here: https://msdn.microsoft.com/en-us/library/dd355316(v=nav.80).aspx
    FYI: You cannot add it as a "Service reference" but have to use the older "Web Reference"
    The package will run without any problem in Visual Studio but as soon as I Deploy the Package and try to schedule it the package fails on the Script Component with the error:
    "The binary code for the script not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully."
    I've tried to run the package in both using the 32bit and 64bit runtime. I have also tried to copy the content of the reference.cs from the reference and added it to a new class according to the steps below. But I still get the same error.
    1. Open Script component 'Select all files' icon in the solution explore
    2. Drill down to webreference, and locate reference.cs file3. Copy the content of this file to a new class file.4.
    Delete the webreference5 .Recompile your code, save and exit6. Open the project to verify that the reference is saved.
    Environment information:
    Windows Server 2012 R2 64 bit (x64) 
    SQL Server 2014 Enterprise Edition  (12.0.2000.8)
    /Fredrik

    The code builds successfully in VSTA.
    When I now try to deploy it to my "Integration Services Catalog" on my dev machine the package will execute without problem. When I deploy it to the production server I get the error. When scheduling on the production server I've created Credentials
    and a Proxy with my own user (same as on my dev machine).
    The production server has access to the web service that I'm trying to call (they are on the same domain network).
    I have managed to get rid of the error in one package using the technique below. But to me this just seemst to be a strange workaround.
    1. Open Script component 'Select all files' icon in the solution explore
    2. Drill down to webreference, and locate reference.cs file3. Copy the content of this file to a new class file.4.
    Delete the webreference5 .Recompile your code, save and exit6. Open the project to verify that the reference is saved.

Maybe you are looking for