Subject RE: [Firebird-Java] Re: Failure on PreparedStatement
Author Robert DiFalco
What seems weird is that if I don't use an input parameter on the PreparedStatement that the server has no problem with it. Maybe it is in the statement preparation that happens on the server? Something different when input parameters are passed?
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Thursday, April 10, 2003 2:59 PM
Subject: [Firebird-Java] Re: Failure on PreparedStatement


> Okay, I've isolated the problem even though I'm still not sure why
> it happens. You should be able to reproduce this no problem.
> Go to your file. Right after the CREATE_TABLE
> statement execution, populate it with one row. Try this:
>         PreparedStatement ps = connection.prepareStatement( "INSERT INTO
> ClassMap(oid,className,mapping,codebase) VALUES (?,?,?,?);" );
>         try
>         {
>             ps.setInt(1,1);
>             ps.setString(2,PreparedStatement.class.getName());
>             ps.setString(3,"foo");
>             ps.setString(4,"bar");
>             ps.executeUpdate();
>         }
>         catch ( Exception e )
>         {
>             e.printStackTrace();
>             throw e;
>         }
> Now you should see the same failure I was getting when you run the
> #testParams method. I still don't know what is causing the failure,
> but this should allow you to at least reproduce it. (The problem was
>  that you had a table with blob fields but it had no data)

Thank you for the test! I have added some more debug output and found
that original stack trace is:

org.firebirdsql.gds.GDSException: internal error
at org.firebirdsql.jgds.GDS_Impl.readStatusVector(
at org.firebirdsql.jgds.GDS_Impl.receiveResponse(
at org.firebirdsql.jgds.GDS_Impl.isc_dsql_fetch(
at org.firebirdsql.jdbc.FBConnection.fetch(
at org.firebirdsql.jdbc.FBResultSet.<init>(
at org.firebirdsql.jdbc.FBStatement.getResultSet(

This leads me to believe that the reason is comparison "=" operator on
blobs. I will ask this question in IB-Support list, since this is an
offtopic here.

Best regards,
Roman Rokytskyy

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.