Friday, March 23, 2012
name of the variable (228 row(s) affected)
after executing a insert in the query anlayser i get a info like (228 row(s)
affected)
How can i acces this value. Is there a internal variablename @.@....
I want to use this value for writing it in a logtable...
Is there any overview of the internal variables which can be used ...
thanks> How can i acces this value. Is there a internal variablename @.@....
Use @.@.ROWCOUNT. A good practice is to save the value in a local variable
for subsequent use.
> Is there any overview of the internal variables which can be used ...
See 'System Functions' in the Books Online for a list of these scalar
functions.
Hope this helps.
Dan Guzman
SQL Server MVP
"Xavier" <Xavier@.discussions.microsoft.com> wrote in message
news:086F2B36-0CE9-460D-BA39-5D7633B4F286@.microsoft.com...
> hello,
> after executing a insert in the query anlayser i get a info like (228
> row(s)
> affected)
> How can i acces this value. Is there a internal variablename @.@....
> I want to use this value for writing it in a logtable...
> Is there any overview of the internal variables which can be used ...
> thanks|||SELECT @.@.ROWCOUNT;
Only available in the very next statement.
"Xavier" <Xavier@.discussions.microsoft.com> wrote in message
news:086F2B36-0CE9-460D-BA39-5D7633B4F286@.microsoft.com...
> hello,
> after executing a insert in the query anlayser i get a info like (228
> row(s)
> affected)
> How can i acces this value. Is there a internal variablename @.@....
> I want to use this value for writing it in a logtable...
> Is there any overview of the internal variables which can be used ...
> thanks|||thanks
Xavier
"Dan Guzman" wrote:
> Use @.@.ROWCOUNT. A good practice is to save the value in a local variable
> for subsequent use.
>
> See 'System Functions' in the Books Online for a list of these scalar
> functions.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Xavier" <Xavier@.discussions.microsoft.com> wrote in message
> news:086F2B36-0CE9-460D-BA39-5D7633B4F286@.microsoft.com...
>
>
Wednesday, March 21, 2012
Name and Description property of OLEDB Source components
I am adding two OLE DB Source components to my pipeline and giving them different names
(via the Sourcename variable) but like they are assuming default name and description i.e. OLE DB Source which is causing the following error message on opening the package that was generated.
The package contains two objects with the duplicate name of "component "OLE DB Source" (37)" and "component "OLE DB Source" (1)"
Here is how I am doing it, in the debugger the names in both instances seem to have set correctly based on the variable but when saved they are lost. What am I doing wrong here?
IDTSComponentMetaData90 source = dataFlowTask.ComponentMetaDataCollection.New();
source.Name = Sourcename;
source.ComponentClassID = "DTSAdapter.OleDbSource.1";
source.Description = Sourcename;
Thanks
Just figured it out. So if anyone else is running into this you need to be aware of the fact that the name you provide to the IDTSComponentMetaData90 is reinitialized after you get the design time instance of the component.
So the Name and other properties have to be assigned after the design time instance is created.