u have to load the driver first. Use Class.forName(sDBDriver); before populating the conn object. Rishabh. -----Original Message----- From: lancelot [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 3:55 PM To: [EMAIL PROTECTED] Subject: I met "No suitable driver" problerm in JBuilder 4, how could I do. > Excuse me, > I use JBuilder 4, and met the problerm below > > java.sql.SQLException: No suitable driver > > My testDBWithoutBean.jsp file is listed below: > > <%@ page import="java.awt.*"%> > <%@ page import="java.util.*"%> > <%@ page import="java.sql.*"%> > <%@ page import="java.text.*"%> > <html> > <head> > <title>TestDBBean > </title> > </head> > > <body> > <%String sDBDriver = "oracle.jdbc.driver.OracleDriver"; > String sConnStr = "jdbc:oracle:thin:@10.1.1.100:1521:ora100" ; > String sSQLStr = "select * from testtab" ; > String ls_bookid ; > String ls_name ; > Connection conn=null; > conn=DriverManager.getConnection(sConnStr,"seg","seg"); > Statement stmt=conn.createStatement(); > stmt.executeQuery(sSQLStr) ; > ResultSet rs=stmt.executeQuery(sSQLStr); > %> > > <hr color="#0000FF"> > <table border="1" cellspacing="0" cellpadding="0" BGCOLOR="#ffcc99" > > <tr> > <th>col11</th> > <th>col22</th> > </tr> > <% while(rs.next()) > { > %> > <tr bgcolor="#CADAF7"> > <td> col11:<%=rs.getString("col11")%></td> > <td> col22: <%=rs.getString("col22")%></td> > </tr> > <%}%> > > </table> > </body> > </html> > > > So, how could I solve this problerm now, I need all your help. > Thanks a lot. > > Lancelot > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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 =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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
