The following must be considered when using the
Statement
or
PreparedStatement
interface:
If you are using threads, and several are using the database,
you must use a separate Statement
for
each thread. Refer to Chapter 10, Using the Driver in a Multithreaded or a Servlet Environment if you are
thinking of using threads, as it covers some important points.
When you are done using the Statement
or PreparedStatement
you should close it.