Re: JDBC connection failure

Поиск
Список
Период
Сортировка
Искать
От
Robert B. Easter
Тема
Re: JDBC connection failure
Дата
Msg-id
0101272142420Z.08820@comptechnews
Ответ на
Список
Дерево обсуждения
JDBC connection failure Culley Harrelson <culleyharrelson@yahoo.com>
Re: JDBC connection failure Jeff Duffy <jduffy@greatbridge.com>
Re: JDBC connection failure "Robert B. Easter" <reaster@comptechnews.com>
Here is a little example I played with that worked fine:

<%@ page info="Example JSP pre-compiled" 
import="java.io.*,java.sql.*,java.text.*" %>


Java-Test: hello

 
<%!
        Connection db;
        Statement st;
        ResultSet rs;
%>
 

 
<%
        Class.forName("org.postgresql.Driver");
        db = DriverManager.getConnection("jdbc:postgresql:databasename", 
"username", "password");
        st = db.createStatement();
        rs = st.executeQuery("SELECT * FROM users");
        while(rs.next()) {
%>

<%
        }
%>
 
unameemail
<%= rs.getString("uname") %><%= rs.getString("email") %>
<% rs.close(); st.close(); db.close(); %> reaster@comptechnews:~/web/java-test$ echo $CLASSPATH .:/usr/local/lib/java/postgresql.jar On Saturday 27 January 2001 12:06, Jeff Duffy wrote: > On Sat, 27 Jan 2001, Culley Harrelson wrote: > > Hi, > > > > I'm pulling my hair out trying to establish a jdbc > > connection to postgresql. The error I recieve is: > > > > unable to load class postgresql.Driver > > The documentation had a typo. The driver class is org.postgresql.Driver > (see the devel docs). -- -------- Robert B. Easter reaster@comptechnews.com --------- -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- ---------- http://www.comptechnews.com/~reaster/ ------------
В списке pgsql-general по дате отправления
От: Robert B. Easter
Дата:
Сообщение: Re: simple function syntax
От: Alan Turner
Дата:
Сообщение: Transactions inside plpgsql?
FAQ