important question

From: najeeb ahmed <najeeb_a_99(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: important question
Date: 2000-12-06 11:35:26
Message-ID: 20001206113526.48715.qmail@web10503.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear sir,
we are finding it difficult to connect to
postgresql database using the postgresql driver i.e.
using jdbc connectivity..trying it on apache web
server on linux
otherwise in ordinary applications it is working fine.
Could u plz suggest us a remedy as soon as possible..
thanking you sir,
najeeb

the pgm is here..
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class tester extends HttpServlet
{
public void doGet(HttpServletRequest
req,HttpServletResponse res) throws
ServletException,IOException
{

res.setContentType("text/html");
PrintWriter pw=res.getWriter();

try
{
Driver
d=(Driver)Class.forName("postgresql.Driver").newInstance();
DriverManager.registerDriver(d);

java.sql.Connection
con=DriverManager.getConnection("jdbc:postgresql:najeeb","najeeb","");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select hi from
test");

while(rs.next())
{ String str=rs.getString(1);pw.println(str); }
pw.close();rs.close();st.close();con.close();
}
catch(Exception ex)
{
pw.println(ex);
}

}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Stosberg 2000-12-06 20:06:07 select cash_out('2'); crashes backend on 7.0.2
Previous Message najeeb ahmed 2000-12-06 04:55:26 source code of jdbc drivers