Re: pgjdbc7.2
От | Raymund |
---|---|
Тема | Re: pgjdbc7.2 |
Дата | |
Msg-id | 000b01c2385b$f604bc00$1611a8c0@amazinglifestyles.com обсуждение исходный текст |
Ответ на | Re: pgjdbc7.2 (Dave Cramer <Dave@micro-automation.net>) |
Список | pgsql-jdbc |
Hello dave, Thanks!! I used these code to initialize the database: try { /*** initialize ***/ Class.forName(driver); conn = DriverManager.getConnection(url, "postgres", "postgres"); stmt = conn.createStatement(); } catch(ClassNotFoundException cnfex) { cnfex.printStackTrace(System.err); submit(cnfex.getMessage(), "Database error encountered"); } catch(SQLException sqlex) { sqlex.printStackTrace(System.err); submit(sqlex.getMessage(), "Database error encountered"); } /*** method ***/ sqlStr = "SELECT * FROM chatmsgstbl WHERE (status = 'queued' or status = 'rejected') AND location in('manila') order by priority, date"; rs = stmt.executeQuery(sqlStr); while(rs.next()) { /** this is line 73 **/ /** some code ***/ } java.lang.NullPointerException at org.postgresql.jdbc2.ResultSet.next(ResultSet.java:113) at com.amazing.ChatTv.ChatTvMsgHandler.run(ChatTvMsgHandler.java:73) at java.lang.Thread.run(Thread.java:484) Is it from the sql statement that I made. Because there where other Statements that call the rs.next but does not return a null value. It seems that the stmt.executeQuery returned a null resultset. raymund -----Original Message----- From: Dave Cramer [mailto:Dave@micro-automation.net] Sent: Tuesday, July 30, 2002 7:15 PM To: Raymund Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] pgjdbc7.2 Raymund, Can you give me more information, like what the statement is, etc or even a repeatable test case? Dave On Tue, 2002-07-30 at 06:51, Raymund wrote: > Gud day! > > Is there something I would have to configure when I am using the > pgjdbc7.2. > My program is working with jdbc7.0-1.2. But when I used the same > program using the new driver, some modules throw null pointer exception > when I call the rs.next. > > Hope to hear from u soon :) > > raymund > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >
В списке pgsql-jdbc по дате отправления: