Subject RE: [Firebird-Java] Re: Failure on PreparedStatement
Author Robert DiFalco
Message
Where you able to reproduce this?
-----Original Message-----
From: Robert DiFalco
Sent: Friday, April 04, 2003 12:53 PM
To: Firebird-Java@yahoogroups.com
Subject: RE: [Firebird-Java] Re: Failure on PreparedStatement

Yeah, sorry, I was being lazy in the test code. My production code uses explicit commit/rollback, I just left it out of the unit test. It seems to make no difference.
 
I think you are correct about the blobs. A prepared statement parameter must be parsed differently from when the parameter is embedded in the SQL select string, at least when it comes to blobs. 
 
Since
 
"SELECT * FROM TableWithBlobs WHERE BlobColumn='FooBar';"
 
Will succed but
 
"SELECT * FROM TableWithBlobs WHERE BlobColumn=?;"
 
fails.
 
 
R.
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Friday, April 04, 2003 12:48 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: Failure on PreparedStatement

>         Connection con = DriverManager.getConnection( url, info );
>         con.setAutoCommit( false );

In this case you have to correct your code. You cannot close
connection that is not in auto-commit mode without _explicitly_
calling commit() or rollback(). But I will check your test case too,
why does it fail. I suspect that this is because you use BLOBs (even
SUB_TYPE 1).

Thanks!
Roman



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.


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.