Connection object can create one or more
Statement objects. You can use the same
Statement object for multiple, unrelated commands and queries. However, a statement has at most one open result set. If you issue multiple queries whose results you analyze concurrently, you need multiple
Be forewarned, though, that at least one commonly used database (Microsoft SQL Server) has a JDBC driver that allows only one active statement at a time. Use the
getMaxStatements method of the
DatabaseMetaData interface to find out the number of concurrently open statements that your JDBC driver supports.
This sounds restrictive, but in practice, you should probably not fuss with multiple ...