Index: src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java,v retrieving revision 1.17 diff -c -r1.17 QueryExecutor.java *** src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java 2002/11/14 05:35:45 1.17 --- src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java 2003/01/27 18:12:05 *************** *** 139,151 **** */ private void sendQuery() throws SQLException { try { pg_stream.SendChar('Q'); for (int i = 0 ; i < m_binds.length ; ++i) { - if (m_binds[i] == null) - throw new PSQLException("postgresql.prep.param", new Integer(i + 1)); pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i])); pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString())); } --- 139,156 ---- */ private void sendQuery() throws SQLException { + // check the binds before starting the query send process. + for (int i = 0 ; i < m_binds.length ; ++i) + { + if (m_binds[i] == null) + throw new PSQLException("postgresql.prep.param", new Integer(i + 1)); + } + try { pg_stream.SendChar('Q'); for (int i = 0 ; i < m_binds.length ; ++i) { pg_stream.Send(connection.getEncoding().encode(m_sqlFrags[i])); pg_stream.Send(connection.getEncoding().encode(m_binds[i].toString())); }