Exploring the depths and potentials of ASP.NET RSS 2.0 or Subscribe to .BenRush by Email
 Saturday, February 18, 2006

If you want the equivalent of SqlCacheDependency for your oracle databases, look at the OracleDependency class:

static void ListenerStart(System.Object p)
{
Oracle.DataAccess.Client.OracleConnection conn = null;
Oracle.DataAccess.Client.OracleDependency dep = null;
try
{
conn = new Oracle.DataAccess.Client.OracleConnection(connectionString);
conn.Open();
Oracle.DataAccess.Client.OracleCommand comm = conn.CreateCommand();
comm.CommandText = "select * from teset_e";
dep = new Oracle.DataAccess.Client.OracleDependency(comm, false, 50000, false);
dep.OnChange += new Oracle.DataAccess.Client.OnChangeEventHandler(dep_OnChange);
comm.ExecuteNonQuery();
// to prevent the objects from being collected (which I bet they will - I don't
// know for sure), we'll just spin in an idle loop forever.
for (; ; System.Threading.Thread.Sleep(1000)){}
}
catch (System.Threading.ThreadAbortException e)
{
// close the databases
if (conn != null)
conn.Close();
}
return;
}

static void dep_OnChange(object sender, Oracle.DataAccess.Client.OracleNotificationEventArgs eventArgs)
{
changeNoticed = true;
Console.WriteLine("Change noticed at " + System.DateTime.Now.ToString());
return;
}

Recommended reading:

kick it on DotNetKicks.com
Saturday, February 18, 2006 12:08:01 AM (Central Standard Time, UTC-06:00)  #    Comments [1] - Trackback
Computing | Database
Tracked by:
http://freewebs.com/aspxfaq/08/sitemap10.html [Pingback]
http://freewebs.com/toltom/00/sitemap12.html [Pingback]
http://freewebs.com/toltom/12/www-autotrader--com.html [Pingback]
http://freewebs.com/toltom/14/sitemap6.html [Pingback]
http://freewebs.com/toltom/06/hearing-aids.html [Pingback]
"http://fartooblog.tripod.com/134.html" (http://fartooblog.tripod.com/134.html) [Pingback]
"http://fartooblog.tripod.com/104.html" (http://fartooblog.tripod.com/104.html) [Pingback]
"http://zbal5s.org/sitemap38.html" (http://zbal5s.org/sitemap38.html) [Pingback]
"http://pmbqoa.org/sex-statistics.html" (http://pmbqoa.org/sex-statistics.html) [Pingback]
"http://topslots.nl.eu.org/17/sitemap20.html" (http://topslots.nl.eu.org/17/site... [Pingback]
"http://freewebs.com/amexa/24/www-olivegarden-com.html" (http://freewebs.com/ame... [Pingback]
"http://freewebs.com/amexa/29/america-west-arena.html" (http://freewebs.com/amex... [Pingback]
"http://freewebs.com/amexa/48/royal-doulton.html" (http://freewebs.com/amexa/48/... [Pingback]
"http://pinofranc.homestead.com/00/university-of-pennsyvania.html" (http://pinof... [Pingback]
"http://pinofranc.homestead.com/02/plastic-surgery-financing.html" (http://pinof... [Pingback]
"http://pinofranc.homestead.com/02/goggins-real-estate.html" (http://pinofranc.h... [Pingback]
"http://npnkp-xxx.com/cute-little-girl.html" (http://npnkp-xxx.com/cute-little-g... [Pingback]
"http://aixpj-www.com/lesbian-grannies.html" (http://aixpj-www.com/lesbian-grann... [Pingback]
"http://maoguunews.netfirms.com/175.html" (http://maoguunews.netfirms.com/175.ht... [Pingback]
"http://havkeenews.tripod.com/197.html" (http://havkeenews.tripod.com/197.html) [Pingback]
"http://hacleenews.tripod.com/33.html" (http://hacleenews.tripod.com/33.html) [Pingback]
"http://ads9z-ooo.com/sucked-simultaneously-tits.html" (http://ads9z-ooo.com/suc... [Pingback]
"http://javboonews.netfirms.com/18.html" (http://javboonews.netfirms.com/18.html... [Pingback]
"http://ccc2k-hhh.com/asian-school-girls-in-thongs.html" (http://ccc2k-hhh.com/a... [Pingback]
"http://h6vcn-xxx.biz/real-amateur-homemade-sex.html" (http://h6vcn-xxx.biz/real... [Pingback]
"http://metnm-www.biz/spacegirl.html" (http://metnm-www.biz/spacegirl.html) [Pingback]
"http://omu8u-eee.com/anime-bukkake.html" (http://omu8u-eee.com/anime-bukkake.ht... [Pingback]
"http://freewebs.com/amexa/38/index.html" (http://freewebs.com/amexa/38/index.ht... [Pingback]
"http://freewebs.com/pentac/10/business-loans.html" (http://freewebs.com/pentac/... [Pingback]
"http://freewebs.com/amexa/32/jackson-browne.html" (http://freewebs.com/amexa/32... [Pingback]
"http://freewebs.com/rimoq/03/state-central-credit-union.html" (http://freewebs.... [Pingback]
"http://freewebs.com/rimoq/16/cheaptickets-co.html" (http://freewebs.com/rimoq/1... [Pingback]
"http://p5roc-rrr.com/atlanta-independent-escorts.html" (http://p5roc-rrr.com/at... [Pingback]
"http://unibetkom.5gbfree.com/00167-blog.html" (http://unibetkom.5gbfree.com/001... [Pingback]
"http://ramambo.nl.eu.org/07/born-shoes.html" (http://ramambo.nl.eu.org/07/born-... [Pingback]
"http://ramambo.nl.eu.org/colorado-school-of-mines.html" (http://ramambo.nl.eu.o... [Pingback]
"http://harum.nl.eu.org/summittracing-com.html" (http://harum.nl.eu.org/summittr... [Pingback]
"http://zx7vqtq.biz/georgia-state-jobs.html" (http://zx7vqtq.biz/georgia-state-j... [Pingback]
"http://ri9spbn.biz/ex-wife-pics.html" (http://ri9spbn.biz/ex-wife-pics.html) [Pingback]
"http://umuqjqf.com/girl-fart.html" (http://umuqjqf.com/girl-fart.html) [Pingback]
"http://yanotblog.nl.eu.org/short-dick-man.html" (http://yanotblog.nl.eu.org/sho... [Pingback]
"http://dero--kom.nl.eu.org/www-redroofinns-com.html" (http://dero--kom.nl.eu.or... [Pingback]
"http://freewebs.com/gabeganews/50.html" (http://freewebs.com/gabeganews/50.html... [Pingback]
"http://heroblog.nl.eu.org/hot-couples-fucking.html" (http://heroblog.nl.eu.org/... [Pingback]
"http://plxguhg.biz/women-of-faith-conference.html" (http://plxguhg.biz/women-of... [Pingback]
"http://kiro--kom.nl.eu.org/sitemap17.html" (http://kiro--kom.nl.eu.org/sitemap1... [Pingback]
"http://tre--blog.nl.eu.org/usaweekend-com.html" (http://tre--blog.nl.eu.org/usa... [Pingback]
"http://nasferablog.netfirms.com/200.html" (http://nasferablog.netfirms.com/200.... [Pingback]
"http://cq7t5nv.biz/www-emcmortgageservicing-com.html" (http://cq7t5nv.biz/www-e... [Pingback]
"http://nasferablog.netfirms.com/365.html" (http://nasferablog.netfirms.com/365.... [Pingback]
"http://vot--kom.nl.eu.org/password-reset.html" (http://vot--kom.nl.eu.org/passw... [Pingback]
"http://wbml1ig.biz/cowlist-landing-page.html" (http://wbml1ig.biz/cowlist-landi... [Pingback]
"http://newa--lono.nl.eu.org/www-cheaptickets-comhttp.html" (http://newa--lono.n... [Pingback]
"http://jafert--niko.nl.eu.org/gallery-wet-contest.html" (http://jafert--niko.nl... [Pingback]
"http://nasferablog.netfirms.com/592.html" (http://nasferablog.netfirms.com/592.... [Pingback]
"http://zf1y1fs.biz/atlanticciityhotels.html" (http://zf1y1fs.biz/atlanticciityh... [Pingback]
"http://wwad6lf.biz/craislist.html" (http://wwad6lf.biz/craislist.html) [Pingback]
"http://derfoblog.ifrance.com/sitemap6.html" (http://derfoblog.ifrance.com/sitem... [Pingback]
"http://freewebs.com/sruone/verizon-pix-place.html" (http://freewebs.com/sruone/... [Pingback]
"http://freewebs.com/sruone/sitemap180.html" (http://freewebs.com/sruone/sitemap... [Pingback]
"http://kipoertaf.homestead.com/46.html" (http://kipoertaf.homestead.com/46.html... [Pingback]
"http://battxgs.info/raunchy-girl.html" (http://battxgs.info/raunchy-girl.html) [Pingback]
"http://freewebs.com/vuter/00/medieval-times-restaurant.html" (http://freewebs.c... [Pingback]
"http://vuter.homestead.com/01/dicount-hotels.html" (http://vuter.homestead.com/... [Pingback]
"http://freewebs.com/vuter/14/sitemap5.html" (http://freewebs.com/vuter/14/sitem... [Pingback]
"http://vuter.homestead.com/01/business-card-case.html" (http://vuter.homestead.... [Pingback]
"http://freewebs.com/datingblogger/1149.html" (http://freewebs.com/datingblogger... [Pingback]
"http://freewebs.com/datingblogger/23.html" (http://freewebs.com/datingblogger/2... [Pingback]
"http://fasxen.netfirms.com/1.html" (http://fasxen.netfirms.com/1.html) [Pingback]
Saturday, April 08, 2006 7:16:24 PM (Central Standard Time, UTC-06:00)
Hi,
Iam a newbie to asp.net and I was trying to use static sitemap provider of Oracle(ODP.NET),but I soon figured out that its not possible to update/reload the tree view control after deleting a node because the cache has not been invalidated.
So I tried to use the OracleDependency class u mentioned ,but I did not understand ,how to keep the listener continously running.I dont really know How Sqldependency works,but I think it listens for notifications from the database.But how does it run continously?Does it run in a seperate thread and how does it switch,when it gets a notification?
I have really spent a lot of time trying to solve the problem,but couldnt do it.
Also,the notification event is fired only once....How to make it work with multiple notifications?
Ne help on this issue would be really appreciated.

Regards,
Prash

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview

Computers Blogs - Blog Top Sites

Archive
<January 2009>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009
Benjamin Rush
Sign In
Statistics
Total Posts: 444
This Year: 0
This Month: 0
This Week: 0
Comments: 128
Themes
Pick a theme:
All Content © 2009, Benjamin Rush
DasBlog theme 'Business' created by Christoph De Baene (delarou)