what does ur variable Query contain?
Ricky Y. Artigas
Analyst/Programmer
Software Development -
Information Technology Division
Easycall Communications Phils., Inc.
418 Arayat Street
Mandaluyong City 1550
Philippines
Tel.no: (+632) 5338001 ext.6574
Pager: 141-002955
Email: [EMAIL PROTECTED]
> -------------------------------
> IMPORTANT NOTICE:
> This message (and any attachment hereto) may contain privileged and/or
> confidential information specific to EasyCall. If you are not the intended
> addressee indicated in this message, you may not copy or disseminate this
> message (or any attachment hereto) to anyone. Instead, please destroy this
> message (and any attachment hereto), and kindly notify the sender by reply
> email. Any information in this message (and any attachment thereto) that
> do not relate to the official business of EasyCall shall be understood as
> neither given nor endorsed by the company.
>
>
> -----Original Message-----
> From: TravisFalls [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, October 10, 2000 8:48 PM
> To: [EMAIL PROTECTED]
> Subject: JDBC Connection
>
> I have a very simple application I have designed to retrieve information
> from a database (Access 2000).? I am running IPlanet 4.1 and when I run
> this method called by a submit, I get an error that says: "Document
> contains no data.? Contact Server's Admin"? I tried this method as a get
> and a post.? If I call the method explicitly from the URL I get "HTTP
> method GET is not supported by this URL".? With IE I just get page not
> found screen.? Any Ideas?
> ?
> ?
> Regards,
> Travis D. Falls
> [EMAIL PROTECTED]
> ?
> public void doPost(HttpServletRequest req, HttpServletResponse res)
> ??????? throws ServletException, IOException{
> ?
> ?????res.setContentType("text/html");????????
> ?????PrintWriter out = res.getWriter();
> ?
> //Works up to here. out.println("hello Here");
> ????????
> ? try{
> ??Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> ??connection =
> ???DriverManager.getConnection("jdbc:odbc:Customer_mdb","guest","guest");
> ??}
> ?
> ?catch(Exception e){
> ??log("an exception was found afterConnectionconnection=DriverManager",e);
> ??connection = null;
> ??}
> //Works up to here out.println("hello Here");?
> ?
> ? try{
> ?? statement = connection.createStatement();
> ?? resultset = statement.executeQuery(Query);?
> ??
> ?
> ??out.println("<html><head><title>B-SiDE Music
> Store</title></head><body><table>");
> ??while (resultset.next()) {
> ??String c = resultset.getString("Customerid");
> ??String f = resultset.getString("FirstName");
> ??String l = resultset.getString("LastName");
> ??String e = resultset.getString("e-mail");
> ??String s = resultset.getString("status");
> ??String p = resultset.getString("Password");
> ??String z = resultset.getString("ZipCode");
> ??out.println("<tr><td>"+ c +" "+ f + " "+? l +" "+ e +" "+ s +" "+ p +" "
> + z +"</td></tr>");
> }
> ?? statement.close();
> ?
> ? }
> ? catch(SQLException sqlex){
> ??log("and sql exception", sqlex);
> ? }
> ?
> }
>
> __________________________________________________________________________
> _
> 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