How do I pass a string from Visual Studio 2012 to an Oracle Package -



How do I pass a string from Visual Studio 2012 to an Oracle Package -

package spec:

create or replace bundle testarea procedure deletetwcblusgprocesstable; procedure preptwcblusgprocesstable(sdate in varchar2); end testarea;

package body:

create or replace bundle body mrobinson28518.testarea procedure deletetwcblusgprocesstable begin delete mrobinson28518.twcblusg_processing; end deletetwcblusgprocesstable; procedure preptwcblusgprocesstable(sdate in varchar2) begin insert mrobinson28518.twcblusg_processing ( billdate, ubr_carrier, ubr_bill_grp, ubr_div, ubr_exchange, ubr_jur, ubr_exch_carr, ubr_date, ubr_jdate, ubr_rate_pd, ubr_element, ubr_call, ubr_type, ubr_qty, ubr_rate, ubr_amount, ubr_mileage, ubr_own_pct, ubr_pop_clli, ubr_filler) select sdate, a.ubr_carrier, a.ubr_bill_grp, a.ubr_div, a.ubr_exchange, a.ubr_jur, a.ubr_exch_carr, a.ubr_date, a.ubr_jdate, a.ubr_rate_pd, a.ubr_element, a.ubr_call, a.ubr_type, a.ubr_qty, a.ubr_rate, a.ubr_amount, a.ubr_mileage, a.ubr_own_pct, a.ubr_pop_clli, a.ubr_filler eur_twcblusg a; end preptwcblusgprocesstable; end testarea;

visual studio code:

private void btnexecute_click(object sender, eventargs e) { oracleconnection ocnt = new oracleconnection("data source=xxxx;user id=xxxxxx;password=xxxxxxxx"); oraclecommand ocmd = new oraclecommand(); seek { ocmd.connection = ocnt; ocmd.commandtype = commandtype.storedprocedure; ocmd.commandtext = "testarea.preptwcblusgprocesstable"; ocmd.parameters.add( new oracleparameter() { parametername = "sdate", oracletype = system.data.oracleclient.oracletype.varchar, direction = parameterdirection.input } ); ocnt.open(); ocmd.executenonquery(); ocnt.close(); }//try

result:

ora-06550: line 1, column 7: pls-00306: wrong number or types of arguments in phone call 'preptwcblusgprocesstable' ora-06550: line 1, column 7: pl/sql: statement ignored

could help?

thank in advance.

mark

ocmd.parameters.add( new oracleparameter() { parametername = "sdate", oracletype = system.data.oracleclient.oracletype.varchar, direction = parameterdirection.input, value = "something" } );

hope need specify value attribute well.

oracle visual-studio parameters plsql

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -