c# - Calling the Oracle function from Oledb Connection -


hi trying call oracle function using following code showing error

"ora-01403: no data found\nora-06512: @ \"test.vod_bulk_trans1\", line 47\nora-06512: @ line 1"

the function takes 3 input parameters , return 1 integer value.

using (oledbconnection conn= new oledbconnection(connectionstring)) {     conn.open();      //set command text (stored procedure name or sql statement)     command.commandtext = "vod_bulk_trans1";      command.parameters.add(new oledbparameter("retval", oledbtype.varchar, 11, parameterdirection.returnvalue, true, 0, 0, "retval", datarowversion.current,null));     command.parameters.add( oledbparameter("@t_list", videoslistwithcommaseparated);     command.parameters.add( oledbparameter("@option1", 3);     command.parameters.add( oledbparameter("@id1", groupid);     command.executenonquery();  } 

please suggest me way how call function or stored procedure using oledb conneciton.

when execute stored procedure ado.net, must set commandtype property idbcommand object commandtype.storedprocedure. sample:

using (oledbconnection conn= new oledbconnection(connectionstring)) {     conn.open();      // set commend type here         command.commandtype = commandtype.storedprocedure;      //set command text (stored procedure name or sql statement)     command.commandtext = "vod_bulk_trans1";      command.parameters.add(new oledbparameter("retval", oledbtype.varchar, 11, parameterdirection.returnvalue, true, 0, 0, "retval", datarowversion.current,null));     command.parameters.add( oledbparameter("@t_list", videoslistwithcommaseparated);     command.parameters.add( oledbparameter("@option1", 3);     command.parameters.add( oledbparameter("@id1", groupid);     command.executenonquery();  } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -