OPENJPA-477 fix setting up parameter list for PreparedStatement

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@627873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2008-02-14 21:10:50 +00:00
parent 7ca1cfe20c
commit 4b45bd5877
1 changed files with 4 additions and 5 deletions

View File

@ -226,10 +226,9 @@ public class SQLStoreQuery
try {
stmnt = prepareCall(conn, buf);
int index = 0;
for (Iterator i = paramList.iterator(); i.hasNext() &&
stmnt != null;)
dict.setUnknown(stmnt, ++index, i.next(), null);
buf.setParameters(paramList);
if (stmnt != null)
buf.setParameters(stmnt);
int count = executeUpdate(store, conn, stmnt, buf);
return Numbers.valueOf(count);