JAVA Procedure Error

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Procedure 'STP_Insert_tblReceipt' expects parameter '@CPVFlag', which was not supplied.

I m getting error at This Point when trying to call procedure... Everything is perfect ,,,Count of Question marks are similar to 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 is for CPV Flag**

After this cs.execute();


Please add the definition of the proc with SQL parameter list. Check the proc, most likely the error is at:

cs.registerOutParameter(19, java.sql.Types.INTEGER);

The variable may be an in-out parameter.

Need Your Help

Hexadecimal Arithmetic Operations with Jquery Possible?

javascript jquery

I am receiving numbers in Hex format. I want to do arithmetic operations with these without having to convert them to decimal and back again? It would be something like:

Unable to import decimal in Python 2.7 or Python 3.3

python python-2.7 python-3.x

I am unable to import decimal in the terminal for Python 2.7 or 3.3.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.