473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Waiting for events in Atlas and .NET 2.0?

I wonder if I can wait for the "events/notifications" from sql 2005 and
then perform some action when the "event/notification" has been sent.

example:
i have a small table with some statistical data that can be updated at
random point of time (based on when the user action was performed).
now, i am caching this table (as custom object) with the
sqlcachedependency and check the values in that class every few seconds
with the atlas:TimerControl in the MasterPage.
I wonder if there is a way where i can just wait for some kind of
notification when the data in the table has been changed or when the
custom object has been removed from the db because of the
sqlcachedependency and then update the content on the page.

wouldn't this be better than checking this object every couple of
seconds?

i hope i explained what i want to accomplish well enough.

thanks,
emer

Apr 28 '06 #1
7 1050
Emer,

One thing you could do is create a SQL CLR trigger that calls back to your
code, or updates a item in your dependency. Interesting idea.

Shaun McDonnell
I wonder if I can wait for the "events/notifications" from sql 2005
and then perform some action when the "event/notification" has been
sent.

example:
i have a small table with some statistical data that can be updated at
random point of time (based on when the user action was performed).
now, i am caching this table (as custom object) with the
sqlcachedependency and check the values in that class every few
seconds
with the atlas:TimerControl in the MasterPage.
I wonder if there is a way where i can just wait for some kind of
notification when the data in the table has been changed or when the
custom object has been removed from the db because of the
sqlcachedependency and then update the content on the page.
wouldn't this be better than checking this object every couple of
seconds?

i hope i explained what i want to accomplish well enough.

thanks,
emer

Apr 28 '06 #2
Shaun,
thanks for the quick response.

do you have any samples for the SQL CLR triggers? i'd like to try it
out.

thanks

Apr 28 '06 #3
actually, i've found some examples.

i am trying to figure out how to call back to my code and update the
webform when the trigger runs.

Apr 28 '06 #4
http://www.sqljunkies.com/Article/4C...EF5E35915.scuk

Let me know if you need anything else.

Shaun McDonnell
Shaun,
thanks for the quick response.
do you have any samples for the SQL CLR triggers? i'd like to try it
out.

thanks

Apr 28 '06 #5
i've build a sample UDF and deployed it to the sql server successfully,
however when i try to deploy the Sql Trigger i get following error
message:

"Deploy failed"

"Cannot find the object "dbo.Table1" because it does not exist or you
do not have permissions"

what am i doing wrong here?

here is the code for the sql trigger:
using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
public partial class Triggers
{
// Enter existing table or view for the target and uncomment the
attribute line
[Microsoft.SqlServer.Server.SqlTrigger (Name="Table1Updated",
Target="dbo.Table1", Event="FOR UPDATE")]
public static void MessageStatisticsUpdated()
{
// Replace with your own code
SqlContext.Pipe.Send("Trigger FIRED");
}
}

Apr 28 '06 #6
the browser page still has to poll. you can use any ajax technology for
this.

-- bruce (sqlwork.com)

<em*************@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
actually, i've found some examples.

i am trying to figure out how to call back to my code and update the
webform when the trigger runs.

Apr 28 '06 #7
i've deplyed the Trigger successfully as well. had to remove the "dbo."
from the table name

like this:
[Microsoft.SqlServer.Server.SqlTrigger (Name="Table1Updated",
Target="Table1", Event="FOR UPDATE")]

Apr 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Darren L. Weber | last post by:
The following is a first attempt to almost create a shell script for installation of ATLAS and LAPACK. It does not work right now and it is specific to a particular platform. It is posted here to...
7
by: AndrewMBaldwin | last post by:
I have a grid control (inherits from Placeholder) that has a few buttons on it. On this grid there is a filter form, which allows the user to filter/search the table for specific information. My...
8
by: Chris | last post by:
Hi, I can't seem to find any info on calling a webservice with atlas and populating a gridview with the results. All the doc shows on the atlas website is alert. Who would want to alert? Please...
2
by: A.Wussow | last post by:
Hi Everybody, i want to load dynamically content from some user controls (with forms, or some data-controls) using atlas. So i use an UpdatePanel for loading the user control into a placeholder....
2
by: Bob | last post by:
Hi, I discovered the new framework 'Atlas' and i want to use it on my existing application. The problem is that on any page of my existing page, the tag <atlas: .../is not recognized. So my...
5
by: igotyourdotnet | last post by:
I have a question on atlas: I can create an 'atlas project' and I can add atlas controls fine. but when I try and add an atlas control to an existing asp.net web app I can't, Why? I did notice...
4
by: Brad Baker | last post by:
I'm trying to implement a gridview control using atlas & asp.net per the following article: http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx My frustration is that the page I've...
4
by: Jono | last post by:
Hi Everyone, As it says in the title, I'm looking for a way to display a page while long running operations are performed on the server. Ideally, I'd like some way to push the current request...
3
by: Robert Scheer | last post by:
Hi. I think I have some conceptual questions here. I have an asp.net web application up and running and now I intend to use Atlas on some of my pages. I have read that after installing Atlas, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.