Have you issued:
Before the first call to setBytes()?
In theory, you should get a different exception thrown but it's the first
thing to check with BLOBS.
The second, can you turn on debugging
(DriverManager.setLogStream(System.err);) to see the query failing. This is
the second report today of an internal query failing, and I'm now wondering
if something in the system tables have changed that's causing these errors -
although I should have seen it when I ran the tests on 7.0 (although it may
have occured in 7.0.1 or 7.0.2).
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council
From: Matt Fair [mailto:matt(at)netasol(dot)com]
Sent: Tuesday, July 18, 2000 7:38 PM
Subject: [INTERFACES] Connection.setBytes()
I want to set an array of bytes to a prepared statement, but it throws a
null pointer exception. Here is my code:
String description = new String(".........4000 Bytes.......");
PreparedStatement pstmt = con.prepareStatement("INSERT INTO
mytable (str) VALUES (?)");
pstmt.setBytes(1,description.getBytes()); //Line 65, throws
Exception in thread "main" java.lang.NullPointerException
==== >at PsqlConsole.prompt(PsqlConsole.java:65) <====
It throws it when I call setBytes(), I don't know what the problem is.
I got the source of setBytes and put it in my code where I have
setBytes(). It was throwing a null pointer when it was calling
Has anyone else had this error?
pgsql-interfaces by date
|Next:||From: Peter Mount||Date: 2000-07-19 06:54:38|
|Subject: RE: Connection.setBytes()|
|Previous:||From: Peter Mount||Date: 2000-07-19 06:41:50|
|Subject: RE: jdbc how to get SERIAL|