Showing posts with label variables. Show all posts
Showing posts with label variables. Show all posts

Thursday, March 8, 2012

Calling a child package from the Main Package

I need to pass variables from the parent package to the child package. I got this to work in a small test case. But in the actual project, I get an error when I try to do that. The parent package's log has this error :

Error: Error 0xC0012050 whike loading package file "c:\.......". Package failed validation from the ExecutePackage task. The package cannot run..

There's nothing more to go on here in the log.

Any ideas ?

-chiraj

May be you will have to check the following

1) Check if the child package is working fine - if you execute it separately with the required input parameters.
2) Guess your child package is stored in the filesystem - Check if the calling package's identitiy has got access to the folder where the child package resides.

Thanks,
Sankaranarayanan MG

|||

I got it to work. There were some Script tasks that were not getting the variables. Once I fixed that, it started working. Now I need to make sure it works consistently. I've read elsewhere that it suddenly chokes.

Thanks

-chiraj

|||

I forgot to mention this. The more important reason why it started working is when I set the property "ExecuteOutOfProcess" to true. By default it is false. I guess there are some memory /thread issues and it was choking.

-chiraj

|||For me the package isolation level was "unspecified" and the TransactionOption was "not supported". Changing them to "Serializable" and "Supported" did the job.

Sander

Calling a child package from the Main Package

I need to pass variables from the parent package to the child package. I got this to work in a small test case. But in the actual project, I get an error when I try to do that. The parent package's log has this error :

Error: Error 0xC0012050 whike loading package file "c:\.......". Package failed validation from the ExecutePackage task. The package cannot run..

There's nothing more to go on here in the log.

Any ideas ?

-chiraj

May be you will have to check the following

1) Check if the child package is working fine - if you execute it separately with the required input parameters.
2) Guess your child package is stored in the filesystem - Check if the calling package's identitiy has got access to the folder where the child package resides.

Thanks,
Sankaranarayanan MG

|||

I got it to work. There were some Script tasks that were not getting the variables. Once I fixed that, it started working. Now I need to make sure it works consistently. I've read elsewhere that it suddenly chokes.

Thanks

-chiraj

|||

I forgot to mention this. The more important reason why it started working is when I set the property "ExecuteOutOfProcess" to true. By default it is false. I guess there are some memory /thread issues and it was choking.

-chiraj

|||For me the package isolation level was "unspecified" and the TransactionOption was "not supported". Changing them to "Serializable" and "Supported" did the job.

Sander

Call Web Service From Script Task

I am trying to call a web service using the web service task and passing it variables, but even when I set variables to be Strings/any other data type, they always get passed out as objects. The call is then rejected based on the fact that there is no web service that accepts those parameter types. If there is a workaround to this problem, that would be great, otherwise I think I'm going to have to call the web services in a script task. Would someone please give me an example of the steps necessary to call a web service from the script task?

Thank you,

James Mac William

Can you instead post your code for us to review?|||currently I'm not using code to handle the service call. The IDE allows for a web service task to be called which I am using. It also allows for global variables to be declared within the package. You can set the global variables equal to any data type, but when they are passed, it is as an object rather than the datatype specified. My question is, can I convert that object to a string within the Web Service Task somehow, or is there a way to directly call the web service from the script task? I know that we can access pipeline elements such as variables from the script task if they are specified as input variables, perhaps there is a way to do this for web services too? I've already downloaded the wsdl file in another web service call that I was able to hardcode the string rather than pass a variable so it knows where the wsdl file is. Any thoughts? Help is much appreciated.|||

To call a web service from a script task, you need to create a wrapper assembly in Visual Studio first for the web service. Then you can add a reference to the wrapper assembly in the script task.

This has an example of calling the Reporting Services web service from a script task: http://mgarner.wordpress.com/2007/06/06/consuming-the-reporting-services-web-service-inside-ssis/

|||So I guess the important part in this example is instantiating the proxy object. I saw the code "wsdl.exe /language:VB /out:ReportService.vb http://[ReportServerName]/ReportServer/ReportService.asmx?WSDL" in the example site that you gave me, but I'm still a bit fuzzy on how to instantiate this proxy object. Can you go into a bit more detail on how to do this. IE Where would I type the above line? Thanks for your help!|||From the Visual Studio command prompt. Or you can start a new VB or C# project, and add a web reference.|||so if I'm in SSIS and I want to make this proxy object programmatically, I would create a script task and then type out what I mentioned before? It didnt seem to be taking that. Is there perhaps some reference to the pipeline that I have to make? I apologize if I'm catching on slowly, I'm somewhat new to SSIS, I really appreciate your help.|||

James Mac William wrote:

so if I'm in SSIS and I want to make this proxy object programmatically, I would create a script task and then type out what I mentioned before? It didnt seem to be taking that. Is there perhaps some reference to the pipeline that I have to make? I apologize if I'm catching on slowly, I'm somewhat new to SSIS, I really appreciate your help.

James,

The command-line tool wsdl.exe can generate C# or VB.Net classes that enable you to consume a web service. The code from the output of running that command can be copied/pasted into your script task for ease of use. or, you can use csc.exe to generate an assembly that you can add as a reference to your script task.

Regards

Jamie

|||it works! thank you thank you thank you, I'm grateful for everyone's help here!

Saturday, February 25, 2012

Calender in Reports 2K

One of my report has 2 input variables, StartDate and EndDate. Is that
possible that I can include a calender control in the report interface such
that user can choose the date rather than typing it in?
I come to know that :
That is not an option today (sure would be a nice improvement). If you
need this then you need to create your own web page and then integrate with
RS using URL or SOAP.
If it is so then can anyone help me with example how to use it.
will be very helpful if i get any attachment.
Thanks & Regards
Labhesh Shrimali
Bangalore -Cross posting to microsoft.public.sqlserver.reportingsvcs since this
question isn't related to security.
Hope this helps.
Dan Guzman
SQL Server MVP
"Labhesh Shrimali - Bangalore"
<LabheshShrimaliBangalore@.discussions.microsoft.com> wrote in message
news:86E50086-C732-4B90-B9F9-881A9EC0FD42@.microsoft.com...
> One of my report has 2 input variables, StartDate and EndDate. Is that
> possible that I can include a calender control in the report interface
> such
> that user can choose the date rather than typing it in?
> I come to know that :
> That is not an option today (sure would be a nice improvement). If you
> need this then you need to create your own web page and then integrate
> with
> RS using URL or SOAP.
> If it is so then can anyone help me with example how to use it.
> will be very helpful if i get any attachment.
> Thanks & Regards
> Labhesh Shrimali
> Bangalore -
>

Calender

One of my report has 2 input variables, StartDate and EndDate. Is that
possible that I can include a calender control in the report interface such
that user can choose the date rather than typing it in?No. That is not an option today (sure would be a nice improvement). If you
need this then you need to create your own web page and then integrate with
RS using URL or SOAP.
Bruce L-C
"Frank" <nospam@.nospam.org> wrote in message
news:eWgWxGxhEHA.3944@.tk2msftngp13.phx.gbl...
> One of my report has 2 input variables, StartDate and EndDate. Is that
> possible that I can include a calender control in the report interface
such
> that user can choose the date rather than typing it in?
>
>

Thursday, February 16, 2012

calculating with variables statistical values. How?

Dear all,
I am trying to solve this but I can't work out.
Set @.DESV_INSERTED = (SELECT stdev(desv) FROM #DESVIATIONTYPICAL WHERE
desviation_id = @.desviation_id AND desv > 0)
SET @.AVERAGE = (SELECT AVG(DESV) FROM #DESVIATIONTYPICAL WHERE
desviation_id = @.desviation_id AND desv > 0)
SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
SET @.MINIMUM = SELECT (@.AVERAGE - @.AUXMIN)
SET @.MAXIMUM = SELECT (@.AVERAGE + @.AUXMIN)
And I obtain the following errors:
Server: Msg 156, Level 15, State 1, Procedure
up_WHS_PeriodWarningQControl_PROC, Line 850
Incorrect syntax near the keyword 'SELECT'.
Server: Msg 156, Level 15, State 1, Procedure
up_WHS_PeriodWarningQControl_PROC, Line 852
Incorrect syntax near the keyword 'SELECT'.
Server: Msg 156, Level 15, State 1, Procedure
up_WHS_PeriodWarningQControl_PROC, Line 853
Incorrect syntax near the keyword 'SELECT'.
Server: Msg 156, Level 15, State 1, Procedure
up_WHS_PeriodWarningQControl_PROC, Line 855
Incorrect syntax near the keyword 'SELECT'.
Server: Msg 170, Level 15, State 1, Procedure
up_WHS_PeriodWarningQControl_PROC, Line 856
Line 856: Incorrect syntax near '='.
Thanks in advance and best regards,Change:
SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
SET @.MINIMUM = SELECT (@.AVERAGE - @.AUXMIN)
SET @.MAXIMUM = SELECT (@.AVERAGE + @.AUXMIN)
To:
SET @.AUXMIN = 1.96 * @.DESV_INSERTED
SET @.MINIMUM = AVERAGE - @.AUXMIN
SET @.MAXIMUM = AVERAGE + @.AUXMIN
and you probably have a few more similar lines in that procedure _after_ the
code you have shown. The line numbers shown in the errors are the lines in
the body of the stored procedure, after the keyword 'AS', so they have an
offset comapred to the line number in the stored procedure declaration
(which includes CREATE PROC and the parameter declarations).
Jacco Schalkwijk
SQL Server MVP
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:30173799-B153-49B2-9223-4C4B282A2B27@.microsoft.com...
> Dear all,
> I am trying to solve this but I can't work out.
>
> Set @.DESV_INSERTED = (SELECT stdev(desv) FROM #DESVIATIONTYPICAL WHERE
> desviation_id = @.desviation_id AND desv > 0)
> SET @.AVERAGE = (SELECT AVG(DESV) FROM #DESVIATIONTYPICAL WHERE
> desviation_id = @.desviation_id AND desv > 0)
>
> SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
> SET @.MINIMUM = SELECT (@.AVERAGE - @.AUXMIN)
> SET @.MAXIMUM = SELECT (@.AVERAGE + @.AUXMIN)
>
> And I obtain the following errors:
>
> Server: Msg 156, Level 15, State 1, Procedure
> up_WHS_PeriodWarningQControl_PROC, Line 850
> Incorrect syntax near the keyword 'SELECT'.
> Server: Msg 156, Level 15, State 1, Procedure
> up_WHS_PeriodWarningQControl_PROC, Line 852
> Incorrect syntax near the keyword 'SELECT'.
> Server: Msg 156, Level 15, State 1, Procedure
> up_WHS_PeriodWarningQControl_PROC, Line 853
> Incorrect syntax near the keyword 'SELECT'.
> Server: Msg 156, Level 15, State 1, Procedure
> up_WHS_PeriodWarningQControl_PROC, Line 855
> Incorrect syntax near the keyword 'SELECT'.
> Server: Msg 170, Level 15, State 1, Procedure
> up_WHS_PeriodWarningQControl_PROC, Line 856
> Line 856: Incorrect syntax near '='.
>
> Thanks in advance and best regards,|||Enric,
SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
is invalid syntax. To use a SELECT expression as
a value, you need to surround the entire SELECT
expression in parenthesis:
SET @.AUXMIN = (SELECT (1.96 * @.DESV_INSERTED))
You did this correctly in the first to SET statement,
but not in the final three.
Steve Kass
Drew University
Enric wrote:

>Dear all,
>I am trying to solve this but I can't work out.
>
>Set @.DESV_INSERTED = (SELECT stdev(desv) FROM #DESVIATIONTYPICAL WHERE
> desviation_id = @.desviation_id AND desv > 0)
>SET @.AVERAGE = (SELECT AVG(DESV) FROM #DESVIATIONTYPICAL WHERE
> desviation_id = @.desviation_id AND desv > 0)
>
>SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
>SET @.MINIMUM = SELECT (@.AVERAGE - @.AUXMIN)
>SET @.MAXIMUM = SELECT (@.AVERAGE + @.AUXMIN)
>
>And I obtain the following errors:
>
>Server: Msg 156, Level 15, State 1, Procedure
>up_WHS_PeriodWarningQControl_PROC, Line 850
>Incorrect syntax near the keyword 'SELECT'.
>Server: Msg 156, Level 15, State 1, Procedure
>up_WHS_PeriodWarningQControl_PROC, Line 852
>Incorrect syntax near the keyword 'SELECT'.
>Server: Msg 156, Level 15, State 1, Procedure
>up_WHS_PeriodWarningQControl_PROC, Line 853
>Incorrect syntax near the keyword 'SELECT'.
>Server: Msg 156, Level 15, State 1, Procedure
>up_WHS_PeriodWarningQControl_PROC, Line 855
>Incorrect syntax near the keyword 'SELECT'.
>Server: Msg 170, Level 15, State 1, Procedure
>up_WHS_PeriodWarningQControl_PROC, Line 856
>Line 856: Incorrect syntax near '='.
>
>Thanks in advance and best regards,
>|||yeah, works.
I am feel very proud of your performance.
Enric
"Jacco Schalkwijk" wrote:

> Change:
> SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
> SET @.MINIMUM = SELECT (@.AVERAGE - @.AUXMIN)
> SET @.MAXIMUM = SELECT (@.AVERAGE + @.AUXMIN)
> To:
> SET @.AUXMIN = 1.96 * @.DESV_INSERTED
> SET @.MINIMUM = AVERAGE - @.AUXMIN
> SET @.MAXIMUM = AVERAGE + @.AUXMIN
> and you probably have a few more similar lines in that procedure _after_ t
he
> code you have shown. The line numbers shown in the errors are the lines in
> the body of the stored procedure, after the keyword 'AS', so they have an
> offset comapred to the line number in the stored procedure declaration
> (which includes CREATE PROC and the parameter declarations).
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:30173799-B153-49B2-9223-4C4B282A2B27@.microsoft.com...
>
>|||Thanks Steve,
Regards to all
"Steve Kass" wrote:

> Enric,
> SET @.AUXMIN = SELECT (1.96 * @.DESV_INSERTED)
> is invalid syntax. To use a SELECT expression as
> a value, you need to surround the entire SELECT
> expression in parenthesis:
> SET @.AUXMIN = (SELECT (1.96 * @.DESV_INSERTED))
> You did this correctly in the first to SET statement,
> but not in the final three.
> Steve Kass
> Drew University
>
>
> Enric wrote:
>
>