Subject | Re: After UDF exception, the current connection stops working |
---|---|
Author | vmdd_tech |
Post date | 2004-01-04T16:26:58Z |
I don't think the problem is in my Venus.doShowResultset because
a different SQL Manager from Hypersonic has the same problem.
As a matter of fact my Venus.doShowResultset should not be called
in the first place. Here is the code:
try {
executionTime_i = System.currentTimeMillis
();
res_i = stmt_i.executeQuery (sql);
executionTime_i = System.currentTimeMillis
() - executionTime_i;
}
catch (SQLException e) {
dispStatus ("ERROR: Failed to execute the
cmd. Reason: " + e.getMessage ());
e.printStackTrace ();
return;
}
// tmpPane.append
final JTextArea tmpPane2 = tmpPane;
Runnable subThread = new Runnable () {
public void run () {
int rowCnt = doShowResultset
(tmpPane2);
dispStatus (rowCnt + " row(s) in " +
executionTime_i + " ms (" + new java.util.Date ().toString () + ")");
if (graphics_i != null) update
(graphics_i);
}
};
SwingUtilities.invokeLater (subThread);
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
e
a different SQL Manager from Hypersonic has the same problem.
As a matter of fact my Venus.doShowResultset should not be called
in the first place. Here is the code:
try {
executionTime_i = System.currentTimeMillis
();
res_i = stmt_i.executeQuery (sql);
executionTime_i = System.currentTimeMillis
() - executionTime_i;
}
catch (SQLException e) {
dispStatus ("ERROR: Failed to execute the
cmd. Reason: " + e.getMessage ());
e.printStackTrace ();
return;
}
// tmpPane.append
final JTextArea tmpPane2 = tmpPane;
Runnable subThread = new Runnable () {
public void run () {
int rowCnt = doShowResultset
(tmpPane2);
dispStatus (rowCnt + " row(s) in " +
executionTime_i + " ms (" + new java.util.Date ().toString () + ")");
if (graphics_i != null) update
(graphics_i);
}
};
SwingUtilities.invokeLater (subThread);
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
> Ben,hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
>
> > Here is a simpler test case:
> >
> > insert into test (news) values ('aaa');
> > insert into test (NEWS) values ('more than 80 chars are in
> >
e
> > ');1.5
> > insert into test (NEWS) values ('more than 80 chars are in
> > hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee');
> >
> >
> > select substr(news,1,2) from test;
> > select substr(news,1,2) from test;
>
> Sorry, both selects cause me truncation exception. I use Firebird
> RC 7, JayBird 1.5 beta 1. No NullPointerException...
>
> > > This time, Jaybird will complain with the following:
> > > java.lang.NullPointerException
> > > at org.firebirdsql.jdbc.field.FBField.isNull
> > (FBField.java:177)
> > > at org.firebirdsql.jdbc.FBResultSet.getField
> > > (FBResultSet.java:336)
> > > at org.firebirdsql.jdbc.FBResultSet.getObject
> > > (FBResultSet.java:295)
> > > at Venus.doShowResultset(Venus.java:4570)
> > > at Venus$11.run(Venus.java:4341)
>
> Here's the code:
>
> public boolean isNull() {
> return (rs.row[numCol] == null);
> }
>
> rs can be null if cursor does not point to the record. Can you post
> your Venus.doShowResultset method?
>
> Thanks!
> Roman