Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 ReadOnlyVariables

Author  Topic 

Trudye
Posting Yak Master

169 Posts

Posted - 2009-08-03 : 12:52:59
I am writing a .NET script to email end-of-job notice to my users. In that eoj notice I have to include how many records came from each user. Because multi files can be sent I am using a For Each loop I am storing the rec count in a variable ("NoInflrecs,NoKCGrecs") for each user.

I placed the variables in the ReadOnlyVariables are of the Script Task, and I reference them in the In setting up the email to use the two variables ("NoInflrecs,NoKCGrecs") in the body of the email. However, they are tagged as not being declared. I tried referencing them with the @ sign and without. I tried referencing them like I do in the Email Task (@[User::NoInflrecs]) and still nada. Here is the code

strBody = "Job completed successfully." + vbCrLf + vbCrLf

strBody += "Number of Influent Records received today: "
strBody += Trim(Str(NoInflrecs)) + vbCrLf
strBody += "Number of KCG Files received today: " + Trim(Str(NoKCGrecs))

Does anyone have any idea how this s/b done??

Thank you,
Trudye

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2009-08-07 : 18:05:56
Is this in SSIS?

An infinite universe is the ultimate cartesian product.
Go to Top of Page
   

- Advertisement -