Result Of Expression Cannot Be Written To A Property

Nov 14, 2006

Hello,

We're trying to launch a SSIS package throw a webservice. This WebService loads a configuration file with "myPackage.ImportConfigurationFile(pathConfig)" and assigns values to some variables with "myPackage.Variables.Item(Parameters.Keys.Item(i)).Value = Parameters.Item(i)". Seems to work.

I we execute the webmethod of the WebService, this works but only when we execute first time, the SSIS finished succesfully. But when we execute a second time the Webmethod, we've a lot of failure with messages:

The result of the expression "@[User::Email]" on property "ToLine" cannot be written to the property. The expression was evaluated, but cannot be set on the property.The result of the expression ""The Import of " + @[User::ExcelFile]+ " is successful"" on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

Thx for your help

View 1 Replies


ADVERTISEMENT

URGENT - My Error Or Bug? The Result Of The Expression Cannot Be Written To The Property. The Expression Was Evaluated, But

Feb 8, 2007

Error 3 Error loading MLS_AZ_PHX.dtsx: The result of the expression ""C:\sql_working_directory\MLS\AZ\Phoenix\Docs\Armls_Schema Updated 020107.xls"" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property. c:documents and settingsviewmastermy documentsvisual studio 2005projectsm l sMLS_AZ_PHX.dtsx 1 1


"C:\sql_working_directory\MLS\AZ\Phoenix\Docs\Armls_Schema Updated 020107.xls"

Directly using C:sql_working_directoryMLSAZPhoenixDocsArmls_Schema Updated 020107.xls
as connectionString works

However - I'm trying to deploy the package - and trying to use expression:
@[User::DIR_WORKING] + "\Docs\Armls_Schema Updated 020107.xls"
which causes the same error to occur

(Same error with other Excel source also:
Error 5 Error loading MLS_AZ_PHX.dtsx: The result of the expression "@[User::DIR_WORKING] + "\Docs\Armls_SchoolCodesJuly06.xls"" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property. c:documents and settingsviewmastermy documentsvisual studio 2005projectsm l sMLS_AZ_PHX.dtsx 1 1
)

View 4 Replies View Related

(URGENT) Cannot Be Written To The Property. The Expression Was Evaluated, But Cannot Be Set On The Property

May 7, 2008

Untill recently I had a smooth running SSIS package,but suddenly it throws error syaing
"OnError,,,,,,,The result of the expression

"@[User:trTextFileImpDirectory] +"SomeTextStringHere"+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ "SomeTextStringHere"
" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property."

I have child SSIS package running under a parent package (through execute package task)

I have few flat file connection managers in child package for text file import , in which I am building text file path dynamically at run time by assigning an expression in connection string property of connection manager.
The Expression is as follows



"@[User:trTextFileImpDirectory] +"SomeTextStringHere."+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ +"SomeTextStringHere"

Where @[User:trTextFileImpDirectory] is a variable which contains path of directory containg text
files.Value in this variable is assigned at runtime from parent package's variable,which in turns fetch
value from a configuration file on local server.

With my current configuration this path has been configured to some other server's directory over network ( I.e my package picks text files from some other servers folder over network)

While
"Some string here"+ @[User:trANTTextFileName]" part of file name string.

(DT_STR,30,1252) @[User:taging_Date_Key] Contain the date of processing ,value in this variable is also picked up at run time from parent package variable.

1) So can someone give me some insight into possible reason of failures.
2) Is it possible that problem arises if directory (from which I m picking text files) is assigned password or is there exist some problem in accessing forlders over network ?
3) Or there can be some problem in package configuration at design time( I.e where I m assigning value in variable from parent package vriables)?




View 10 Replies View Related

Changing Code Page Property Using Property Expression Doesn't Work

Jun 16, 2006

I am having problems exporting data into a flat file using specific code page. My application has a variable "User::CodePage" that stores code page value (936, 950, 1252, etc) based on the data source. This variable is assigned to the CodePage property of desitnation file connection using Property expression.

But, when I execute the package, the CodePage property of the Destination file connection defaults to the initial value that was set for "User:CodePage" variable in design mode. I checked the value within the variable during runtime and it changes correctly for each data source. But, the property of the destinatin file connection doesn't change and results in an error.

[Flat File Destination [473]] Error: Data conversion failed. The data conversion for column "Column01" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[DTS.Pipeline] Error: The ProcessInput method on component "Flat File Destination" (473) failed with error code 0xC02020A0. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

If I manually update the variable with correct code page and re-run the ETL, everything works fine. Just that it doesn't work during run-time mode.

Can someone please help me resolve this.

Thanks much.

View 5 Replies View Related

CASE Function Result With Result Expression Values (for IN Keyword)

Aug 2, 2007

I am trying to code a WHERE xxxx IN ('aaa','bbb','ccc') requirement but it the return values for the IN keyword changes according to another column, thus the need for a CASE function.

WHERE GROUP.GROUP_ID = 2 AND DEPT.DEPT_ID = 'D' AND WORK_TYPE_ID IN ( CASE DEPT_ID WHEN 'D' THEN 'A','B','C' <---- ERROR WHEN 'F' THEN 'C','D ELSE 'A','B','C','D' END )

I kept on getting errors, like

Msg 156, Level 15, State 1, Line 44Incorrect syntax near the keyword 'WHERE'.
which leads me to assume that the CASE ... WHEN ... THEN statement does not allow mutiple values for result expression. Is there a way to get the SQL above to work or code the same logic in a different manner in just one simple SQL, and not a procedure or T-SQL script.

View 3 Replies View Related

OLE DB Command With Property Expression

Jan 10, 2006

Hi,

I am trying to use an OLE DB Command to run a different SQL command for each row in the data flow. I have a script component that builds the SQL command and puts it in a data flow variable, and a property expression in the data flow mapping [OLE DB Command].[Sql Command] to that variable.

The problem is that the OLE DB Command has a validation error, saying that "the command text was not set for the command object", and it doesn't run.

Did I miss anything? should I tell the OLE DB Command that the SQL command would come from expression? or is it a bug?

Thanks.

View 5 Replies View Related

IIF Expression In Text Align Property

Oct 30, 2007



I have run into what appears to be a strange bug (or I am expecting too much) in SQL Reporting Services.

I have a field with a dollar amount. If the dollar amount = 0, then the users want "NA" to display. I have this set-up correctly.

I have now found that if the dollar amount is displayed, they want the text box right aligned, and if the "NA" is displayed, then they want the text box to be center aligned.

I put the following expression in the "TextAlign" property setting...




Code Block
=IIF(Field.value = 0, Center, Right)


Now the IIF function is available in my expression window, and so is "Center" and "Right". But when I try to run the report, I get the error that "Center" is not declared.

So maybe this just is not possible in SQL Reporting Services, but I wanted to check before I told the users "no can do".

BTW, I tried "Left", "Right", and "General" in place of "Center" and got the same error.

Thank you,

T.J.

View 5 Replies View Related

Cannot Open Property Expression Editor

Feb 13, 2007

Hi,

I want to change expression of a variable but dont see ellipses icon in expression. The variable property EvaluateAsExpression is assigned TRUE.

I have reinstalled SSIS...i am sure there was a icon to open Property Expression Editor for a variable...dont see it anymore.

-Amar



View 3 Replies View Related

Variable/Expression/Property Confusion

Oct 9, 2006

First and foremost, I'm officially and thoroughly confused between Variable, Expression and settings. I need help clearify this up for me.

I'm going to use the Flat File Connection as an example.

I have:

> A global variable named: FileToImportFullPath (string) that stores the full path of the file I want to import. Note: the file path will change has the package executes (the location of the file depends on a number of conditions, namely the Date and Time of the package execution)

> A Flat File Connection Manager used by a Flat File source in the package's main Data Flow

So ideally, I want the Flat File Connection Manager's ConnectionString to be set to whatever the value of FileToImportFullPath variable is at the time. To accomplish this, I set the ConnectionString Expression to equal to FileToImportFullPath. First question, if I set the ConnectionString Expression, is it okay for me to leave the ConnectionString property (i.e. in the Editor or the Property Editor) blank? Second, whenever I leave the ConnectionString property blank, I will get a warning stating: "A valid file name must be selected". Since this is a warning, I ignored, but during exeuction, the value really is blank. Also, I'm 100% certain that the FileToImportFullPath variable is set correctly before the Data Flow step is executed.

All in all, I'm just confused if an object's property must be set if there is already an express for it (e.g., in the file move task, the source and the destination properties).



Thanks,

Jason

View 4 Replies View Related

Custom Components - How To Evaluate A Property As An Expression?

Apr 11, 2008



Hi all,

I'm wondering if anyone's accomplished this before - I've been unable to find a whiff of info on how to do this so far.

I'm creating a custom component that I'd like to give a "Derived Column" type of ability to. By that, I mean I'd like to populate a property of my component with an expression (including references to input columns, package variables and functions) and be able to evaluate it at runtime - per row processed by the component.

I would also appreciate any information as to how to provide the interface to allow the user to build such an expression as well - is there a UI function in SSIS I can call to pop up the "expression builder"?


Thanks!

View 6 Replies View Related

Connection Manager Property Expression Editor

May 16, 2007

Is it possible to use a property, say name, of an object ( say the connection object) in the "Property Expression" of that object? I would like to modify the Connection String property of a flat file connection manager to append date to it. To do this I need to be able to use the Name property of the connection manager in the Property Expression editor. How ever I get an error that it does not recognize name, it almost seems to suggest I can only use variables. I find it hard to believe since it seems like common requirement to be able to use properties of an object (connection manager) in modifying other properties of the object. Any help would be greatly appreciated.
Thanks.

View 1 Replies View Related

Connection Manager Property Expression Editor

May 16, 2007

Is it possible to use a property, say name, of an object ( say the connection object) in the "Property Expression" of that object? I would like to modify the Connection String property of a flat file connection manager to append date to it. To do this I need to be able to use the Name property of the connection manager in the Property Expression editor. How ever I get an error that it does not recognize name, it almost seems to suggest I can only use variables. I find it hard to believe since it seems like common requirement to be able to use properties of an object (connection manager) in modifying other properties of the object. Any help would be greatly appreciated.
Thanks.

View 6 Replies View Related

Bug: Expression On Disable Property Doesn't Have Desired Effect

Jul 18, 2007

[Microsoft follow-up]



Hello,

I think I've found a bug.



I have an expression set on the 'Disable' property of a data-flow task. When the expression evaluates to true the data-flow still executes. That seems wrong to me.



I ahve a demo package here: http://folders.live.com/self.aspx/VQ9oHa1TJjc/Public/SSIS%20Stuff/ExamplePackages/20070717%20Expression%20on%20Disable%20property%20has%20no%20effect/Package1.zip



Please reply letting me know whether this is indeed a bug or not.



I'm on SP1 by the way.



Regards

Jamie

View 9 Replies View Related

Strange Result When Trying To Use The IsMissing Property

Mar 7, 2007

Hello once again !

This is a very strange result I had noticed while using the IsMissing property.

I had the following Expression.

=IIF(Fields!CertainField.IsMissing = True, "N/A", Sum(Fields!.CertainField.Value))
This should just put the text "N/A" into the textfield if the specific field is missing from the dataset in the report.

I had put this in the following TextFields:-

The group's detail and the table Footer.

The result that I had gotten show an empty textfield in the group's detail but showed "N/A" in the page footer. So I know that the expression I had used is correct since it showed up in the table footer. What baffles me is that it didn't give me a "#Error" in the textfield, but an empty string (which essentially is correct, since this particular field in the dataset is missing to begin with).

The question I am asking is, does this have anything to do with the scope or is it something else, and how do I resolve this problem ?

Sincerely,
Bernard Ong

View 7 Replies View Related

Export To Excel, CSV, XML With Expression In Hidden Property Omits Data

Jun 7, 2007

I have a matrix table with a rectangle in the data cell. The rectangle has an image and textbox. The textbox has an expression in it's Hidden property based on the column name. The report renders fine on screen. When the report is exported to Excel, CSV, XML the textbox contents are not output (the images display as expected). I've tried setting the DataElementOutput to Output/Yes with no success. Exporting to TIFF, PDF, Web Archive/MTHML is fine.



Here is a sample RDL which exhibits the issue:



<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<DataSources>

<DataSource Name="Gemini50DataSource">

<DataSourceReference>Gemini50DataSource</DataSourceReference>

<rdataSourceID>bb03313c-48a4-4e40-af99-ed584847ca20</rdataSourceID>

</DataSource>

</DataSources>

<BottomMargin>1in</BottomMargin>

<RightMargin>1in</RightMargin>

<ReportParameters>

<ReportParameter Name="ImagePath">

<DataType>String</DataType>

<DefaultValue>

<Values>

<Value>c:</Value>

</Values>

</DefaultValue>

<Prompt>Image Path</Prompt>

</ReportParameter>

</ReportParameters>

<rdrawGrid>true</rdrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rdnapToGrid>true</rdnapToGrid>

<Body>

<ReportItems>

<Matrix Name="matrix1">

<MatrixColumns>

<MatrixColumn>

<Width>3.75in</Width>

</MatrixColumn>

</MatrixColumns>

<RowGroupings>

<RowGrouping>

<Width>1.75in</Width>

<DynamicRows>

<ReportItems>

<Textbox Name="PicIndex">

<rdefaultName>PicIndex</rdefaultName>

<ZIndex>1</ZIndex>

<Style>

<TextAlign>Right</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>=Fields!PicIndex.Value</Value>

</Textbox>

</ReportItems>

<Grouping Name="matrix1_PicIndex">

<GroupExpressions>

<GroupExpression>=Fields!PicIndex.Value</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicRows>

</RowGrouping>

</RowGroupings>

<ColumnGroupings>

<ColumnGrouping>

<DynamicColumns>

<ReportItems>

<Textbox Name="ColumnName">

<rdefaultName>ColumnName</rdefaultName>

<ZIndex>2</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<BackgroundColor>LightBlue</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>=Fields!ColumnName.Value</Value>

</Textbox>

</ReportItems>

<Grouping Name="matrix1_ColumnName">

<GroupExpressions>

<GroupExpression>=Fields!ColumnName.Value</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicColumns>

<Height>0.25in</Height>

</ColumnGrouping>

</ColumnGroupings>

<DataSetName>DataSet2</DataSetName>

<Width>5.5in</Width>

<Corner>

<ReportItems>

<Textbox Name="textbox1">

<rdefaultName>textbox1</rdefaultName>

<ZIndex>3</ZIndex>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value />

</Textbox>

</ReportItems>

</Corner>

<Height>0.55208in</Height>

<MatrixRows>

<MatrixRow>

<Height>0.30208in</Height>

<MatrixCells>

<MatrixCell>

<ReportItems>

<Rectangle Name="rectangle1">

<ReportItems>

<Image Name="image1">

<Sizing>AutoSize</Sizing>

<Left>0.25in</Left>

<MIMEType />

<ZIndex>1</ZIndex>

<Visibility>

<Hidden>=IIF(First(Fields!ColumnName.Value = "image"), Len(Fields!CellValue.Value)=0, true)</Hidden>

</Visibility>

<Width>0.3in</Width>

<Source>External</Source>

<Style />

<Value>="file:" + Parameters!ImagePath.Value + Fields!CellValue.Value</Value>

</Image>

<Textbox Name="textbox2">

<Left>1.625in</Left>

<DataElementOutput>Output</DataElementOutput>

<rdefaultName>textbox2</rdefaultName>

<Visibility>

<Hidden>=IIF(Fields!ColumnName.Value &lt;&gt; "image", False, True)</Hidden>

</Visibility>

<Width>1.875in</Width>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<BackgroundColor>PeachPuff</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Height>0.25in</Height>

<Value>=Fields!CellValue.Value</Value>

</Textbox>

</ReportItems>

<Visibility>

<Hidden>=IIF(True, False, True)</Hidden>

</Visibility>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<BackgroundColor>LightGrey</BackgroundColor>

</Style>

</Rectangle>

</ReportItems>

</MatrixCell>

</MatrixCells>

</MatrixRow>

</MatrixRows>

</Matrix>

</ReportItems>

<Height>0.625in</Height>

</Body>

<rd:ReportID>a944d20c-558a-4805-9d4c-aecc9757f678</rd:ReportID>

<LeftMargin>1in</LeftMargin>

<DataSets>

<DataSet Name="DataSet2">

<Query>

<rd:UseGenericDesigner>true</rd:UseGenericDesigner>

<CommandText>SELECT 1 as PicIndex, 'image' as ColumnName, 'image1.jpg' as CellValue

union

SELECT 2,'image','image2.jpg'

union

SELECT 3,'image','image3.jpg'

union

SELECT 4,'image',null

union

SELECT 5,'something else',null

union

SELECT 6,'another column', 'display my text!'</CommandText>

<DataSourceName>Gemini50DataSource</DataSourceName>

</Query>

<Fields>

<Field Name="PicIndex">

<rd:TypeName>System.Int32</rd:TypeName>

<DataField>PicIndex</DataField>

</Field>

<Field Name="ColumnName">

<rd:TypeName>System.String</rd:TypeName>

<DataField>ColumnName</DataField>

</Field>

<Field Name="CellValue">

<rd:TypeName>System.String</rd:TypeName>

<DataField>CellValue</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<Width>5.625in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Language>en-US</Language>

<TopMargin>1in</TopMargin>

</Report>

View 2 Replies View Related

Using A Variable In An Expression To Populate The Executable Property Of An Execute Process Task In SSIS

Jan 22, 2008

Hello,

I am having a hard time setting the executable path for an Execute Process Task in SSIS. I have a variable that is initialized at package statup which holds the path to an executable in Windows. When I set the property "Executable" Path in an expression, I get a warning that the path for the executable is not set. One workaround was to try and initialize the variable with a bogus path with the hopes that the "correct" value will be written on run-time. NO LUCK. I still get the error and I cannot run the package until I put a static path.

Does anyone have a clue as to what is going on??

Mike

View 1 Replies View Related

SSRS | For Multiple Dataset | How To Show No Result Message | Norows Property

May 5, 2008

Hi All,

I created one report having more than two datasets. How can I display the "No result found Message" If some of the dataset having no data.

Thanks,
Aneesh

View 4 Replies View Related

3 / 2=1? Strange Result In Expression...HELP!

Oct 29, 2006

Hi Folks!I have a strange thing happening; I have a field that Counts the number ofrecords and another field that shows the number of clients(Count(RecordID)=3 and NoOfClients=2) When I do a simple expression"Count(RecordID)/NoOfClients" the expected result should be 1.5. Insteadthe result I get is 1. Any ideas?Thanks!Rick

View 4 Replies View Related

Reporting Services :: Expression To Take A Result And Change Name

Jun 3, 2015

Is there a way of taking a result from a query and pulling out a certain account number and displaying those account numbers - as fred?  Eg.  I have a drop down of account number (s) however they pull from a table that only displays them as account numbers.  I would like to give more a description to certain account numbers that are pulled.  Eg.  account number 234 will be fred and account number 555 will be sam etc.  Trying to add it to the query on the dataset is complicated, so I was wondering if I created an additional blank field with an expression to be able to do this? 

View 7 Replies View Related

Expression To Show Result 12 Months Back

Feb 18, 2008

I´m creating a report in SSRS 2005 where you can filter after month and year. The result is the total sale for that particular month. What I want to do, is adding an extra column to compare with the result in the same month last year. F.eks. say that I choose january 2008 I would like to see the results for january 2007.

I thought of writing an expression to do that, but as that isn't my stronges side I would appreciate some help

View 3 Replies View Related

SSIS Expression Result Limit Of 4000 Bytes

Feb 6, 2007

I have a package with an input column that is varchar(8000).

I want to strip the first byte off of this column and put it in one result column and the remainder of the field I want to go to a second column. If the input column is an empty string, I want to return NULL.

Pulling the first byte off works fine, no issues, however putting the remainder of the input column into an output column is giving me a little trouble.

If I use this expression:

LEN(FLD1) == 0 ? NULL(DT_WSTR,1) : SUBSTRING(FLD1, 2, LEN(FLD1) - 1))

I get an error that says my expression evaluates to a string of greater than 4000 bytes.

If I do this instead:

LEN(FLD1) == 0 ? NULL(DT_WSTR,1) : RTRIM(SUBSTRING(FLD1, 2, 7999))

The expression passes muster but I get the warning that I will be truncating the column at 4000 bytes.

In actuality, I don't care if the result column is truncated after 4000 bytes. I find the second solution to be a bit clunky and I'm wondering if anyone can give me a reason why the first solution won't evaluate but the second will?

View 14 Replies View Related

Expression Issue With Custom Data Flow Component And Custom Property

Apr 2, 2007

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: "DB189912189912.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 "DB189912189912.VER" and I expected "DB200701200701.VER"



Any idea ?



View 5 Replies View Related

Custom Task - Custom Property Expression

Aug 16, 2006

I am writing a custom task that has some custom properties. I would like to parameterize these properties i.e. read from a varaible, so I can change these variables from a config file during runtime.

I read the documentation and it says if we set the ExpressionType to CPET_NOTIFY, it should work, but it does not seem to work. Not sure if I am missing anything. Can someone please help me?

This is what I did in the custom task

customProperty.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;

In the Editor of my custom task, under custom properties section, I expected a button with 3 dots, to click & pop-up so we can specify the expression or at least so it evaluates the variables if we give @[User::VaraibleName]

Any help on this will be very much appreciated.

Thanks

View 3 Replies View Related

Value Of A Readonly Property Of Custom Task Is Not Updated In Property Window

Apr 17, 2008

Hi,

I developed a simple custom control flow component which has several read/write properties and one readonly property (lets call it ROP) whichs Get method simple returns the value of a private variable (VAR as string). In the Execute method the VAR has a value assigened. When I put the value of ROP or VAR into MsgBox I can see the correct value. However when I execute the component I can not see the value of the ROP in the property window. I see the property but its value is empty string. For example when I put a breakpoint to postexecute or check the property before click OK in a MsgBox I would expect that the property value would be updated in SSIS as well. Is there a way how to display correct values of custom tasks properties in property window?

Thanks for any hints.

View 3 Replies View Related

Same UID Can't Be Written To Database

Dec 18, 2007

I'm having a database insertion problem. I make an entry to my registration form, write it to the database; then the next registration entry displays an error that the same UID can't be written to the database. I don't know where to start tracing this, but here is the stored procedure I use and some of the code that might generate it.
            @UserName nvarchar(128),            @Email nvarchar(50),            @FirstName nvarchar(25),            @LastName nvarchar(50),            @Teacher nvarchar(25),            @GradYr int    DECLARE @UserID uniqueidentifier    SELECT @UserID = NULL    SELECT  @UserID = UserId FROM dbo.aspnet_Users WHERE LOWER(@UserName) = LoweredUserName
INSERT INTO [table name](UserID,UserName,Email,FirstName,LastName,Teacher,GradYr) VALUES (@UserID,@UserName,@Email,@FirstName,@LastName,@Teacher,@GradYr)     Protected Sub cuwCreateUserWizard1_CreatingUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles cuwCreateUserWizard1.CreatedUser        strEmail = CType(cuwCreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("Email"), TextBox).Text        strUserName = CType(cuwCreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UserName"), TextBox).Text.ToLower        strFirstName = CType(cuwCreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("txtFirstName"), TextBox).Text        strLastName = CType(cuwCreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("txtLastName"), TextBox).Text        lngGradYr = CType(cuwCreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("txtGradYr"), TextBox).Text        strTeacher = CType(cuwCreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer.FindControl("txtTeacher"), TextBox).Text    End Sub    Protected Sub cuwCreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles cuwCreateUserWizard1.CreatedUser        Dim cmd As New SqlCommand("sp_CreateUser", con)        cmd.CommandType = Data.CommandType.StoredProcedure        cmd.Parameters.AddWithValue("@UserName", strUserName)        cmd.Parameters.AddWithValue("@Email", strEmail)        cmd.Parameters.AddWithValue("@FirstName", strFirstName)        cmd.Parameters.AddWithValue("@LastName", strLastName)        cmd.Parameters.AddWithValue("@Teacher", strTeacher)        cmd.Parameters.AddWithValue("@GradYr", lngGradYr)        Using con            con.Open()            cmd.ExecuteScalar()            con.Close()        End Using        cmd.Equals(Nothing)    End Sub
Please let me know if any other info is needed to help determine what's wrong.

View 8 Replies View Related

How Can I Check When Something Is Written In A DB?

Oct 6, 1998

Hi,

i have following problem:

I have a DB with 4 tables in MSSQL6.5. In those tables write an NT service (4 threads for each table) 24h/day. I want to know somehow when i have no write in one of those tables for more than 1-2 hours (i dont want to querry those tables everytimes). MSSQL6.5 offer this kind of facilities? Or I can do this using stored procedures or something else?

Thank you very much,
Sebastian Bologescu

View 1 Replies View Related

Is My SProc Written Correctly?

Dec 31, 2005

I am very new to SQL server and I'm using stored procedures for my program. So far I wrote one tonight, that works just fine.
I haven't really written one before, but its kind of similar syntax since I know C++/C# and VB.
My question is, even though this works for what I need it do, is it written correctly? Can you see any problems with it, or would you have done it differently?
I want to make sure its done correctly, and it runs as fast as possible.
Thanks!
[pre]
CREATE PROCEDURE CreateNewUser
 @UserID   int out, @LoginID   nvarchar(30), @Password   nvarchar(30), @RegisterDate  smalldatetime, @LoginIDExists  nvarchar(30)AS /* Check to see if the loginID is already in use before attempting to save it.  We MUST have a unique loginID for each user */ SELECT @LoginIDExists = loginID FROM users WHERE loginID = @LoginID
 /* If we pulled a value from the database, then the loginID already exists, return with error code 1 */ IF (@LoginIDExists = @LoginID)    BEGIN   SELECT 1   RETURN  END
 ELSE BEGIN /* The loginID does not already exist, attemp to add the new user to the database. */ INSERT INTO users (  loginID,  loginpassword,  registerDate )  VALUES (  @LoginID,  @Password,  @RegisterDate )
 /* Grab the UserID for the new user. */ SELECT @UserID = @@identity
 /* return with error code 0 */ SELECT 0   RETURN  ENDGO
[/pre]

View 6 Replies View Related

Written Plan For 6.5 > 7.0 Upgrade?

Oct 12, 1999

I'm wondering if anyone has a written project plan for upgrading a server to 7.0 from 6.5.
I'm looking to make this upgrade myself shortly. I would appreciate any dialog, or a written
working plan. Thanks,



Mark Blackburn o `"._ _ M onterey
mark@mbari.org o / _ |||;._/ ) B ay
Science at its Best! ~ _/@ @ /// ( ~ A quarium
(831) 775-1880 ( (`__, ,`| R esearch
http://www.mbari.org/ '.\_/ |\_.' I nstitute

Database Administrator
MBARI Personal Web Page: http://www.mbari.org/~mark/

View 1 Replies View Related

Does This Script Written For Sql 7 Run With Sql2000?

Aug 27, 2002

If someone can tell me if this script run with sql2000 it would be great.
Thanks in advance.

SELECT "Date du traitement :" = getdate()
go
print 'ORDRE DE TRI '
print '----------------------'
go
EXEC SP_HELPSORT
GO

print ' '
print 'VERSION'
print '-------------'
print ' '
go
SELECT @@VERSION
GO

print ' '
print 'CONFIGURATION DU SERVEUR '
print '----------------------------------------------'
print ' '
go
EXEC SP_CONFIGURE
GO

print ' '
print 'LISTE DES BASES SQL'
print '---------------------------------'
print ' '
go
EXEC SP_HELPDB
GO

PRINT " "
PRINT " "
PRINT 'LISTE DES DEVICES'
PRINT '-----------------'
PRINT " "
EXEC SP_HELPdevice
PRINT " "
GO
DECLARE @cmd NVARCHAR (300)
DECLARE @cmd1 NVARCHAR (300)
DECLARE @cmd2 NVARCHAR (300)
DECLARE @cmd3 NVARCHAR (300)
DECLARE @dbid INT
DECLARE @MaxId INT
DECLARE @dbName SYSNAME
SET @MaxId = (SELECT MAX(dbid) FROM MASTER.dbo.sysdatabases)
SET @dbid = 1
print " "
print " "
print'DETAIL DE CHAQUE BASE 'print" "print" "

WHILE @dbid <= @MaxId
BEGIN
SET @dbName = (SELECT name FROM MASTER.dbo.sysdatabases WHERE dbid = @dbid)
IF (@dbname IS NOT NULL)
BEGIN
select @cmd3 ='DETAIL DE LA BASE ' + @dbname
print @cmd3
PRINT '************************************************* ********************************************'
print ' '
select @cmd = 'use ' + quotename(@dbname) + ' exec sp_helpfile'
exec (@cmd)
print ' '
print ' '
print 'UTILISATEUR DE LA BASE '+ RTRIM(@dbname)
print '************************************************* ******** '
print ' '
select @cmd1 = 'use ' + quotename(@dbname) + ' exec sp_helpuser'
exec (@cmd1)
PRINT ' '
print ' '
print 'DROITS POUR LES OBJETS DE LA BASE '+ RTRIM(@dbname)
print '************************************************* ******** '
print ' '
select @cmd2 = 'use ' + quotename(@dbname) + ' exec sp_helprotect'
exec (@cmd2)
SET @dbid = @dbid + 1
END
ELSE
SET @dbid = @dbid + 1
print " "
print " "
END

View 1 Replies View Related

Num Of Checks Written In 4 Day Period For More Than $400

Apr 25, 2006

I have a transaction table which has Date as datetime field, amount and account number. i want to find out count of checks that were written in a period of 4 days which exceeded i.e. > $400, between 401 and 500, > 501 for a single month. the table has data for more than a year and i want the results then grouped in monthly format like in
OCT between 300 & 400 #30 (30 customers gave checks total worth $300-$400 within any 4 consecutive days period in the month of OCT )
between 400 & 500 # 20
> 501 # 10

NOV between 300 & 400 #30
between 400 & 500 # 20
> 501 # 10

and so on for a 6 month period.

View 1 Replies View Related

LOB Is Written Into Wrong Filegroup

Apr 26, 2006

Hi there!

I've a table with a nvarchar(max) column on Filegroup2. While inserting a lot of big datas (Word documents, each 2.5MB), the primary filegroup is growing - but the Filegroup2 remains still on its creation size.

Is that a bug? By the way, i ve dropped the table and recreated on the other filegroup, after that i've restartet the SQL 2005 Service.

Someone experience?

Thanks, Torsten

View 1 Replies View Related

Reporting Services :: Running Value Expression Within Lookup Expression In SSRS?

Oct 28, 2015

I have created 1 report with 2 datasets. This report is attached to the 1st dataset.For example,1st one is "Smallappliances", 2nd is "Largeappliances".

I created a tablix and, the 1st column extracts Total sales per Sales person between 2 dates from 1st dataset (Small appliances). I used running values expression and it works fine.

Now, I would like to add another column that extracts Total sales per sales person between 2 dates from 2nd dataset (Large appliances). I am aware that I need to use Lookup expression and it is giving me the single sales value rather than the total sales values. So, I wanted to use RunningValue expression within lookup table to get total sales for large appliances.

This is the lookup expression that I added for the 2nd column.

=Lookup(Fields!salesperson.Value,Fields!sales_person.Value,RunningValue(Fields!sales_amount.Value,
sum, " sales_person"),
"Largeappliances").

I get this error when I preview the report.An error occurred during local report processing.The definition of the report is invalid.An unexpected error occurred in report processing.

(processing): (SortExpression ++ m_context.ExpressionType)

View 7 Replies View Related

Migrating Scripts Written Around Access To Sql.

Feb 27, 2007

Hey guys, I had purchased a program that generates full operational asp.net pages from an access db. I was unfamiliar with the language, and so that was the route I took. After disecting it and studying I've learned a bit and made it work in my environment. However, I now need to migrate everything over to mssql. I got the db portion down and now I'm trying to modify my scripts to point to a sql db rather than an access db. I thought it was going to be relatively simple but it's proving to be quite a challenge for me.Was wondering if anyone could check my work.
 The original access driven page had the following connection strings.vb page had [ public strConn as string="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("../") & "/db/db.mdb"end class]and in my aspx. pages I hadAccessDataSourceControl1.selectcommand="SELECT * FROM table "AccessDataSourceControl1.ConnectionString = strConn
 My new page now has the following.I got rid of the .vb page and put this in.
Dim myConnection as New SqlConnection("Server=mysqlserver;Database=db;UID=myusername;PWD=my pw;")
Const strSQL as String ="SELECT * FROM table"
Dim myCommand as New SqlCommand(strSQL, myConnection)
 
further down I have a wmx data grid. I'm assuming I don't need to touch that but there is a line that has,
<wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ></wmx:AccessDataSourceControl>
and I don't know what the equivilant of that is. I know its pointing to the accessdatasoucrcontrol1 that has the select command, but what would be the equivilant ofwmx:accessdatasourcecontrol?Also, is this the way to go? by that i mean, should I just rescript everything? Also,
1) Am I connecting to the sql db properly? 2) some sites say I have to put a connection string in the web.config file, is that true?3) Does any one have any references I can goto, I'm having some trouble finding a good article that lays down exactly what needs to go where in an sql asp.net environment.
 Thanks guys.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved