Skip to content

Commit

Permalink
fix issue TVP Handling is causing exception when calling SP with retu…
Browse files Browse the repository at this point in the history
…rn value microsoft#80
  • Loading branch information
xiangyushawn committed Dec 9, 2016
1 parent 13fe3e8 commit 97d580c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,12 @@ public <T> T unwrap(Class<T> iface) throws SQLException
/*L2*/ private void verifyParameterPosition(int param) throws SQLServerException {
boolean bFound=false;
try {
bFound = rsProcedureMeta.absolute(param+1); //Note row 1 is the 'return value' meta data
if(((SQLServerPreparedStatement)stmtParent).bReturnValueSyntax){
bFound = rsProcedureMeta.absolute(param);
}
else{
bFound = rsProcedureMeta.absolute(param+1); //Note row 1 is the 'return value' meta data
}
}
catch (SQLException e) {
MessageFormat form = new MessageFormat(SQLServerException.getErrString("R_metaDataErrorForParameter"));
Expand Down

0 comments on commit 97d580c

Please sign in to comment.