Showing posts with label enable. Show all posts
Showing posts with label enable. Show all posts

Friday, March 9, 2012

Expression issue with Custom Data Flow Component and Custom property

Hi,

I'm trying to enable Expression for a custom property in my custom data flow component.

Here is the code I wrote to declare the custom property:

public override void ProvideComponentProperties()

{

ComponentMetaData.RuntimeConnectionCollection.RemoveAll();

RemoveAllInputsOutputsAndCustomProperties();

IDTSCustomProperty90 prop = ComponentMetaData.CustomPropertyCollection.New();

prop.Name = "MyProperty";

prop.Description = "My property description";

prop.Value = string.Empty;

prop.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;

...

}

In design mode, I can assign an expression to my custom property, but it get evaluated in design mode and not in runtime

Here is my expression (a file name based on a date contained in a user variable):

"DB" + (DT_WSTR, 4)YEAR( @.[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @.[User::varCurrentDate] ), 2 ) + "\\" + (DT_WSTR, 4)YEAR( @.[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @.[User::varCurrentDate] ), 2 ) + ".VER"

@.[User::varCurrentDate] is a DateTime variable and is assign to 0 at design time

So the expression is evaluated as: "DB189912\189912.VER".

My package contains 2 data flow.

At runtime,

The first one is responsible to set a valid date in @.[User::varCurrentDate] variable. (the date is 2007-01-15)

The second one contains my custom data flow component with my custom property that was set to an expression at design time

When my component get executed, my custom property value is still "DB189912\189912.VER" and I expected "DB200701\200701.VER"

Any idea ?

Are you certain that the data flows are being executed in the order you expect?

What is the scope of your variable?

I tried a test case with 2 data flows connected to each other in the control flow. In the first, I had a row count transform populate a variable (of package scope). In the second, I set a dataflow property expression to use the variable, and confirmed that it did use the value set by the Row Count, so it seems your scenario should work...

Mark

|||

Sorry,

You're right.

I was confused because even in debug mode (when execution is interupted with a DataViewer), the property value was "DB189912\189912.VER"

So I have added a ComponentMetaData.FireInformation with the property value, and the value was "DB200701\200701.VER"

Next time, I will start with the ComponentMetaData.FireInformation... ;-)

Sorry again

Thanks a lot

|||No problem, glad to hear you have it working!

Friday, February 24, 2012

expose 1433 on net

I need to exposed 1433 on the net to enable a IIS6 pages to query remote SQL
servers.
Im looking for information on how to do this as securely as possible
(although im sure this is not ideal) ?
At the moment im using SQL authentication only.
Thanks for any information
ScottWhy not install SQLXML and take advantage of the easy stored procedure to
web services tool. Then you can apply an SSL certificate and have your web
site only talk to SQL Server over TCP 443. It's safer, it's encrypted, it's
extensible, and it's more portable. It's SOA!
hth,
Eric
scott wrote:
> I need to exposed 1433 on the net to enable a IIS6 pages to query
> remote SQL servers.
> Im looking for information on how to do this as securely as possible
> (although im sure this is not ideal) ?
> At the moment im using SQL authentication only.
> Thanks for any information
> Scott|||sounds excellent but how do you set it up ?
Currently my aspx app on IIS6 queries SQL on an IP addresson port 1433 and
pulls back XML.
How do i install SQLXML ?
Use the web service tool ?
Setup SSL ?
(guess I just forward port 443)
Sorry for all the questions
Scott|||you should start by reading about sqlxml at
http://www.microsoft.com/sql/techinfo/xml/default.asp
scott wrote:
> sounds excellent but how do you set it up ?
> Currently my aspx app on IIS6 queries SQL on an IP addresson port
> 1433 and pulls back XML.
> How do i install SQLXML ?
> Use the web service tool ?
> Setup SSL ?
> (guess I just forward port 443)
> Sorry for all the questions
> Scott

expose 1433 on net

I need to exposed 1433 on the net to enable a IIS6 pages to query remote SQL
servers.
Im looking for information on how to do this as securely as possible
(although im sure this is not ideal) ?
At the moment im using SQL authentication only.
Thanks for any information
Scott
Why not install SQLXML and take advantage of the easy stored procedure to
web services tool. Then you can apply an SSL certificate and have your web
site only talk to SQL Server over TCP 443. It's safer, it's encrypted, it's
extensible, and it's more portable. It's SOA!
hth,
Eric
scott wrote:
> I need to exposed 1433 on the net to enable a IIS6 pages to query
> remote SQL servers.
> Im looking for information on how to do this as securely as possible
> (although im sure this is not ideal) ?
> At the moment im using SQL authentication only.
> Thanks for any information
> Scott
|||sounds excellent but how do you set it up ?
Currently my aspx app on IIS6 queries SQL on an IP addresson port 1433 and
pulls back XML.
How do i install SQLXML ?
Use the web service tool ?
Setup SSL ?
(guess I just forward port 443)
Sorry for all the questions
Scott
|||you should start by reading about sqlxml at
http://www.microsoft.com/sql/techinfo/xml/default.asp
scott wrote:
> sounds excellent but how do you set it up ?
> Currently my aspx app on IIS6 queries SQL on an IP addresson port
> 1433 and pulls back XML.
> How do i install SQLXML ?
> Use the web service tool ?
> Setup SSL ?
> (guess I just forward port 443)
> Sorry for all the questions
> Scott