Click here to Skip to main content
15,888,984 members
Home / Discussions / Database
   

Database

 
AnswerRe: Development and production database servers Pin
badprog11-Jan-11 8:33
badprog11-Jan-11 8:33 
AnswerRe: Development and production database servers Pin
Dr.Walt Fair, PE11-Jan-11 9:22
professionalDr.Walt Fair, PE11-Jan-11 9:22 
GeneralRe: Development and production database servers Pin
vanikanc11-Jan-11 9:27
vanikanc11-Jan-11 9:27 
GeneralRe: Development and production database servers Pin
Dr.Walt Fair, PE11-Jan-11 9:38
professionalDr.Walt Fair, PE11-Jan-11 9:38 
GeneralLogins are not Users Pin
David Mujica11-Jan-11 9:49
David Mujica11-Jan-11 9:49 
GeneralRe: Development and production database servers Pin
J4amieC12-Jan-11 0:04
J4amieC12-Jan-11 0:04 
AnswerRe: Development and production database servers Pin
jschell12-Jan-11 8:46
jschell12-Jan-11 8:46 
QuestionOracle 11g Continuous Query Notification to a vs 2005 c# service Pin
livez11-Jan-11 2:21
livez11-Jan-11 2:21 
Hello!

Im trying to set up a Continuous Query Notification between our oracle database and my c# service, but can´t seem to get it to work. This is the method I have for making the connection:


private void SubscribeToTable(string tableName)
        {
            Log.Write("Add listener: " + tableName);

            OracleConnection con = DataBase.GetOpenConnection();
            OracleDependency dependency = new OracleDependency();
            dependency.QueryBasedNotification = false;
            OracleCommand cmd = con.CreateCommand();
            cmd.CommandText = "Select * from " + tableName;
            dependency.OnChange += new OnChangeEventHandler(dependency_OnChange);
            dependency.AddCommandDependency(cmd);
            cmd.Notification.IsNotifiedOnce = false;
            cmd.AddRowid = true;
            cmd.ExecuteNonQuery();
            con.Close();
            con.Dispose(); 
        }


And when I run this I get a row in user_change_notification_regs with these values:

42	4	net8://(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.119)(PORT=1521))?PR=0	0	0	49999	WEB.EXPORTEDDOCUMENTS


and this is the callback event:


static void dependency_OnChange(object sender, OracleNotificationEventArgs eventArgs) 
        {
            Log.Write("Table has been Changed");
            Log.Write(eventArgs.Source.ToString());
            Log.Write(eventArgs.Info.ToString());
            Log.Write(eventArgs.Source.ToString());
            Log.Write(eventArgs.Type.ToString()); 
        }


My problem is the callback-event never runs. Has anyone else had this problem?
AnswerRe: Oracle 11g Continuous Query Notification to a vs 2005 c# service Pin
sonosun9-Feb-11 13:42
sonosun9-Feb-11 13:42 
GeneralRe: Oracle 11g Continuous Query Notification to a vs 2005 c# service [modified] Pin
livez9-Feb-11 21:01
livez9-Feb-11 21:01 
GeneralRe: Oracle 11g Continuous Query Notification to a vs 2005 c# service Pin
sonosun10-Feb-11 6:47
sonosun10-Feb-11 6:47 
GeneralRe: Oracle 11g Continuous Query Notification to a vs 2005 c# service Pin
sonosun10-Feb-11 8:28
sonosun10-Feb-11 8:28 
GeneralRe: Oracle 11g Continuous Query Notification to a vs 2005 c# service Pin
sonosun22-Feb-11 8:30
sonosun22-Feb-11 8:30 
QuestionRe-indexing Pin
vanikanc10-Jan-11 6:57
vanikanc10-Jan-11 6:57 
AnswerRe: Re-indexing Pin
David Mujica10-Jan-11 7:31
David Mujica10-Jan-11 7:31 
QuestionSQL Server row lock Pin
Tridip Bhattacharjee9-Jan-11 23:59
professionalTridip Bhattacharjee9-Jan-11 23:59 
AnswerRe: SQL Server row lock Pin
Pete O'Hanlon10-Jan-11 1:01
mvePete O'Hanlon10-Jan-11 1:01 
AnswerImplement your own locking Pin
David Mujica10-Jan-11 3:04
David Mujica10-Jan-11 3:04 
QuestionInsert not working ?? Pin
scorp_scorp9-Jan-11 20:05
scorp_scorp9-Jan-11 20:05 
AnswerRe: Insert not working ?? Pin
Estys9-Jan-11 23:54
Estys9-Jan-11 23:54 
QuestionDatabase Extraction Help Pin
crain19819-Jan-11 6:24
crain19819-Jan-11 6:24 
AnswerRe: Database Extraction Help Pin
crain19819-Jan-11 10:29
crain19819-Jan-11 10:29 
QuestionRe: Database Extraction Help Pin
Luc Pattyn9-Jan-11 12:18
sitebuilderLuc Pattyn9-Jan-11 12:18 
AnswerRe: Database Extraction Help Pin
crain19819-Jan-11 13:12
crain19819-Jan-11 13:12 
GeneralRe: Database Extraction Help Pin
crain19819-Jan-11 13:13
crain19819-Jan-11 13:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.