Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Wednesday, March 28, 2012

Parse SQL Statements

Hi.

Does anyone come across this error message whenever u try to parse ANY SQL statements in Management Studio 2005 (even parsing SELECT GETDATE() fails)...

>>>

.Net SqlClient Data Provider: Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
>>>

Thks!

See this KB article Yogi, I'm assuming it's the problem you're seeing:

http://support.microsoft.com/kb/910416

HTH

Friday, March 23, 2012

parent child package with expressions

Hi there,

sorry if the message seems a bit garbled i cannot see the textbox properly with ie7/ff

anyways. the situation.

childpackage contains a loop-container. in there i use an ole-db-source with a variable

based on an expression. ie. "select * from foo where bar=" + len(@.[bar]) == 0 ? "initial" : @.[bar] + " and etc=1"

where bar is the variable that is set by the loop.

this works great.

however i need to call this package several times, only the expression is a tad different.

so i need a scripttask that sets the expression correctly, then i call the childpackage

and map the current-expression to the expression in childpackage.

how do i do that? or am i doing it wrong?

my script-task looks something like:

dts.Variable("theVar").Expression = " ""select * from foo where bar="" + len(@.[bar]) == 0 ? ""initial"" : @.[bar] + "" and etc=1"" "

in the childpackage i have a package-conf that maps thevar to thequery with target-object expression.nevermind this. i got it working now.

i had to assign it to a variable. that was passed via package-configuration to expression and then it works.