java - wrong number or types of arguments in call to 'DROP_QUEUE_TABLE' -
i trying drop queue using jdbctemplate().update method. -
getjdbctemplate().update("call dbms_aqadm.drop_queue_table (?, ?)", qtablename.touppercase(),true);
dbms_aqadm.drop_queue_table takes 2 parameters. 1) queue_table string , 2) force boolean.
whn try run above code, getting -
preparedstatementcallback; bad sql grammar [call dbms_aqadm.drop_queue_table (?, ?)]; nested exception java.sql.sqlexception: ora-06553: pls-306: wrong number or types of arguments in call 'drop_queue_table' ora-06553: pls-306: wrong number or types of arguments in call 'drop_queue_table'
but when running following code works fine-
getjdbctemplate().update("call dbms_aqadm.create_queue_table (?, ?)", qtablename.touppercase(), payloadtype.touppercase());
what guessing is, problem passing oracle objects (which not varchar or int) parameters.
i wnat know there way solve this.
boolean parameters not supported. recomended write own wrapper procedure int parameter or pass pl/sql block fixed true parameter:
begin dbms_aqadm.drop_queue_table( queue_table => ?, force => true); end;
Comments
Post a Comment