>hi,
>This might seem a bit trivial,but i am just not able to connect to a db
>i have set the classpath to tools.jar as well as jsdk.jar...
>JSP's code works fine except for recognising the sql related keywords..
>i know it has got  to do with importing java.sql packages ,but it is not
>happening..

So what DOES happen on your code below?
Compile time error?
Exceptions?

>here is the code below...can anyone show me where the problem might be..
>thanks,
>naveen
>
><HTML>
>
><HEAD><TITLE>
>A JSP APPLICATION
></TITLE></HEAD>
><BODY BGCOLOR="white">
>
><%out.println("it prints");%>
><%@ page language="java" import="java.sql.*" %>
>
><%
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> Connection c = DriverManager.getConnection("jdbc:odbc:naveen","dba","sql");
> Statement st=c.createStatement();
> ResultSet rs=st.executeQuery("Select Name,ID,Place,Dgn from employee");
>
>%>
><table>
> <% while(rs.next())
>     { %>
>   <tr>
>   <td><%=rs.getInt("ID")%></td>
>   <td><%=rs.getString("Name")%></td>
>   <td><%=rs.getString("Place")%></td>
>   <td><%=rs.getString("Dgn")%></td>
>   </tr>
>
>  <%}%>
> </table>
>
>
></BODY>
></HTML>
>
===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST"
.
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html

Ciao,
        Carsten Heyl

  Carsten Heyl                          [EMAIL PROTECTED]
  NADS - Solutions on Nets              http://www.nads.de/
  NADS GmbH                             http://www.pixelboxx.de/
  Hildebrandtstr. 4E                    Tel.: +49 211 933 02-90
D-40215 Duesseldorf                     Fax.: +49 211 933 02-93

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to