Hi All,

I am using JDBC connection to connect my jsp file with an Access database.

I connect to the database, fire an SQL querry, fetch the results & show the
result.  One loop is completed.  Now if I need to fetch some other data from
some other table from the same database (.dsn), Can I use the same
connection or will I have to connect everything from the beginning?

To be very specific, which of the statements from below will I have to write
again?

try {
 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
 } catch(java.lang.ClassNotFoundException e) {
 System.err.print("ClassNotFoundException: ");
 System.err.println(e.getMessage());
    }
Connection con = DriverManager.getConnection("jdbc:odbc:shop.dsn", "", "");

Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery ("Another Query....");

Thanx :-) & Regards,

Kaushal.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to