Can you give me some sample code?
Main Topics
Browse All TopicsHi Experts,
I have two separate packages that do download and upload tasks for a billing interface. I want to know the status of both the packages through a web page, how can I achieve that?
Any input is highly appreciated.
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There are a number of different options you can do. bhess1 is right in suggesting that you store the data in a table. One way you can do it is to create a table with three or four columns. The first column will hold the name of your package. The rest of the columns will have info on the package: a flag if the package is executing or idle, a flag if the last run succeeded or failed, and a time when the package was last run. You can even have a time that the package succeeded or failed as well.
You can store the data in the table by doing an update statement in an Execute SQL Task. The task can be put in various places, like at the end of the package or in the OnPostExecute event handler of the package (In OnPostExecute, the task could run multiple times depending on where the package failed). This is all you would need in the task:
UPDATE Table
SET Status = 0 -- Idle
, Result = 1 -- Success
, LastFinished = GETDATE()
WHERE
PackageName = 'PackageName'
You can also put this into an Expression in the task and use this to dynamically use the current package's name. That way you only need to copy and paste this code to other packages:
"UPDATE Table
SET Status = 0 -- Idle
, Result = 1 -- Success
, LastFinished = GETDATE()
WHERE
PackageName = '" + @[System::PackageName] + "'"
Note that the quotes between the PackageName variable are actually single and double quotes:
PackageName = <Single><Double> + @[System::PackageName] + <Double><Single><Double>
Business Accounts
Answer for Membership
by: bhess1Posted on 2009-10-14 at 10:23:55ID: 25572844
The easiest way would be for the packages to update a table with their status info as they start, run, and complete. Then you are simply displaying information from the table, and not trying to jump through some obscure hoops to find out how the packages are doing.