sql server - JAVA Procedure Error -


java.sql.sqlexception: [microsoft][sqlserver 2000 driver jdbc][sqlserver]procedure 'stp_insert_tblreceipt' expects parameter '@cpvflag', not supplied.

i m getting error @ point when trying call procedure... perfect ,,,count of question marks similar parameter provided

cs = conn.preparecall("{call stp_insert_tblreceipt(?,?,?,  ?,?,?,  ?,?,?,  ?,?,?,  ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?)}"); // cs = conn.preparecall("{call stp_receipt_form_insertion_trial(?,?,?,  ?,?,?,  ?,?,?,  ?,?,?,  ?)}"); cs.setlong(1, long.parselong(txtmobileno.gettext())); cs.setstring(2, string.valueof(cbodistributor.getselecteditem())); cs.setlong(3, long.parselong(txtboxno.gettext())); cs.setint(4, integer.parseint(txtfileno.gettext())); cs.setstring(5, pickup_date); cs.setstring(6, rec_date); cs.setstring(7, string.valueof(cmbctrlno.getselecteditem())); cs.setstring(8, username); cs.setstring(9, rec_date); cs.setstring(10, regionlocation); cs.setstring(11, txtremark.gettext().trim()); cs.setstring(12, txtsimno.gettext().trim()); cs.setint(13, 2); cs.setstring(14, string.valueof(cmbaryanregion.getselecteditem())); cs.setstring(15, string.valueof(cbopickuptype.getselecteditem())); cs.setstring(16, string.valueof(txtcafno.gettext())); cs.setstring(17, distributorid); //cs.setstring(18, circlename); cs.setstring(18, cbocircle.getselecteditem().tostring()); cs.registeroutparameter(19, java.sql.types.integer); cs.setstring(20, auditorname); cs.setstring(21, retailername); cs.setstring(22, retailercode); cs.setint(23, mappedflag); //cs.setstring(24, distcode); cs.setstring(24, cbodistcode.getselecteditem().tostring()); //cs.setstring(25, zonename); cs.setstring(25, cbozone.getselecteditem().tostring()); cs.setstring(26, comment); **cs.setint(27, 1);** **this cpv flag** 

after cs.execute();

please add definition of proc sql parameter list. check proc, error at:

cs.registeroutparameter(19, java.sql.types.integer); 

the variable may in-out parameter.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -