I am developing a Windows service that uses an Oracle advanced queue to control it. Command objects will be queued and the service will deploy it and try to complete the work. I also developed a small command application to control the service. This app will keep the command on the queue, but I would also like to be able to clean Qi by calling the debings_adm.pur_q_tube_table whenever a button is pushed. I have tried these two methods first I tried:
(Oracle Connection Connection = New Oracle Connection (Configuration Manager. Connection Strings ["Connection String"]. ConnectionString) {conn .Open (); Oracle Commands CMD = Conn. Cret Commands (); Cmd.CommandType = CommandType.StoredProcedure; Cmd.CommandText = "dbms_aqadm.purge_queue_table"; Cmd.Parameters.Add ("queue_table", "PRISMPRO_Q_TAB"); Cmd.Parameters.Add ("purge_condition", DBNull.Value); Cmd.Parameters.Add ("purge_options", DBNull.Value); Cmd.ExecuteNonQuery (); Conn.Close (); }
And I get the following error:
ORA-0650: line1, column 7: PLS-00306: Wrong number or logic type ' Call PURGE_QUEUE_TABLE ORA-0650: Line 1, Column 7: PL / SQL: Statement Ignored
DBMS_Adm.Purg_QTTable contains 3 parameters and I have given 3 arguments to it. Apart from that, they are the right type, there is no reason because I can tell why this error should be. I am unable to know how to get rid of it, so I tried the following:
(OracleConnection conn = new OracleConnection (Connection Manager Connection "[ConnectionString"]. ConnectionString) } {Conn.Open (); Oracle Commands CMD = Conn. Cret Commands (); Cmd.CommandType = CommandType.Text; Cmd.CommandText = "exec dbms_aqadm.purge_queue_table ('PRISMPRO_Q_TAB', NULL, NULL)"; Cmd.ExecuteNonQuery (); Conn.Close (); }
and got the error:
ORA-00900: Invalid SQL statement
SQL statement is invalid. It runs just fine in the SQL developer, so in any case I am getting an error message that unless I am getting nothing what I should not get. I can not understand any way around it, will anyone tell me what I am doing or how am I working wrongly?
I can bet you need:
CMD Bidbyname = true;
No comments:
Post a Comment