Hi,

Try to use ConnectionPooling. You can find free connection pool codes by
searching internet. I suggest you to read "Java Servlet Programming" book
from O'Reilly books. ISBN 1-56592-391-X

If you want to use a result of a query for querying again, place that query
as an inner query sentence behaving like a table name in the outer query.
Don't use programming for such things.


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Jose Manuel
Valencia
Sent: Tuesday, April 09, 2002 7:55 PM
To: [EMAIL PROTECTED]
Subject: Best practices


Hi:

When an application needs several querys (selects and updates), what's
better,
have only one Connection object, Statement, ResultSet, DataMetaData and pass
through parameters to methods OR within each method have your Connection,
Statement, ResultSet, and DataMetaData objects.

One more question, if is necesary have a query into another query, what's
better, use 2 set of objects (Connection, Statement, ResulSet, DataMetaData)
OR
to make one query and put the results into a Vector object then do the other
query (use only a set of objects).

In your experience people, what's better for both cases?

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to