Subject | RE: [Firebird-Java] Re: Failure on PreparedStatement |
---|---|
Author | Robert DiFalco |
Post date | 2003-04-04T20:00:49Z |
Fwiw, the same test succeeds if there is no input parameter and the
WHERE compare value is specified in the actual string, like so:
PreparedStatement st = con.prepareStatement( "SELECT
ClassMap.oid,classname,mapping,codebase FROM ClassMap WHERE
classname='" + Persistence.class.getName() + "';" );
ResultSet rs = st.executeQuery();
This executes fine. The following gives the exception I've shown you.
PreparedStatement st = con.prepareStatement( "SELECT
ClassMap.oid,classname,mapping,codebase FROM ClassMap WHERE
classname=?;" );
st.setObject( 1, Persistent.class.getName() );
ResultSet rs = st.executeQuery();
R.
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Friday, April 04, 2003 11:47 AM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: Failure on PreparedStatement
Robert,
by email)? You have run into error that is believed to be critical
for current transaction and then for some reasons driver could not
end that transaction.
However, I would like to see what kind of problem you have and what
had happened to driver. Also ensure that you can recreate this
problem using latest version of JayBird (since neither RC4 nor
release was made so far, you have to build driver yourself - its
easy). Also include version of your databse server in your post
(including build number, 3-digit number at the end of a version).
Thanks!
Roman
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
WHERE compare value is specified in the actual string, like so:
PreparedStatement st = con.prepareStatement( "SELECT
ClassMap.oid,classname,mapping,codebase FROM ClassMap WHERE
classname='" + Persistence.class.getName() + "';" );
ResultSet rs = st.executeQuery();
This executes fine. The following gives the exception I've shown you.
PreparedStatement st = con.prepareStatement( "SELECT
ClassMap.oid,classname,mapping,codebase FROM ClassMap WHERE
classname=?;" );
st.setObject( 1, Persistent.class.getName() );
ResultSet rs = st.executeQuery();
R.
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Friday, April 04, 2003 11:47 AM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: Failure on PreparedStatement
Robert,
> I'm getting a failure on a prepared statement. It seems that evenCan you post your complete code with database schema here (or send me
> if I am doing something wrong that it shouldn't fail in this way
> (i.e. IllegalStateException).
>
> Here's a small unit test:
by email)? You have run into error that is believed to be critical
for current transaction and then for some reasons driver could not
end that transaction.
However, I would like to see what kind of problem you have and what
had happened to driver. Also ensure that you can recreate this
problem using latest version of JayBird (since neither RC4 nor
release was made so far, you have to build driver yourself - its
easy). Also include version of your databse server in your post
(including build number, 3-digit number at the end of a version).
Thanks!
Roman
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.