Subject | Re: Error reading data from the connection |
---|---|
Author | schroed1974 <schroed74@hotmail.com> |
Post date | 2003-03-04T16:49:06Z |
Hi,
with RC2 it seems to work properly with prepared statement, but now
there is a problem with CallableStatement, whenever I try to execute a
stored procedure. Analogous problem with RC1. The only workaround
seems to be RC3 with VARCHAR types in place of CHAR types.
Please let me know any news.
Thanks
Angelo
--- In Firebird-Java@yahoogroups.com, "Ryan Baldwin"
<ryan.baldwin@n...> wrote:
with RC2 it seems to work properly with prepared statement, but now
there is a problem with CallableStatement, whenever I try to execute a
stored procedure. Analogous problem with RC1. The only workaround
seems to be RC3 with VARCHAR types in place of CHAR types.
Please let me know any news.
Thanks
Angelo
--- In Firebird-Java@yahoogroups.com, "Ryan Baldwin"
<ryan.baldwin@n...> wrote:
> Hi,case ...
>
> I cant really help much but your post made me think about my test
>my test
> The problem I get is that the thread blocks indefinatly when the int
> pr.executeUpdate() method is called - I tried a few modifications to
> case to see if I could re-produce your exception - but no luck stilljust
> blocks forever.same
>
> It does look though that it 'might' be another manifestation of the
> problem - the fact that it works with non-prepared statements pointsmore in
> this direction - maybe you could test against RC 1 or RC 2 and seewhat
> happens then. If it is related to the same problem it should go awaythen.
> Currently I use RC1 in my app because of this bug - I had a problemwith RC
> 2 but cant remember what it was - it could have just been me doingsomething
> stupid.work. This
>
> >Is there a way to treat CHAR type with prepared statement?
> From what I can see it looks to me like what you are doing should
> appears to be a driver bug.the
>
> Thanks
> Ryan
>
> -----Original Message-----
> From: schroed1974 <schroed74@h...> [mailto:schroed74@h...]
> Sent: 04 March 2003 12:42
> To: Firebird-Java@yahoogroups.com
> Subject: [Firebird-Java] Re: Error reading data from the connection
>
>
> I think the problem is related to the bug #696521: if I change all
> table row with type CHAR to type VARCHAR, everything works fine.Z_SALES_AGENT");
> Is there a way to treat CHAR type with prepared statement?
>
> please let me know if there are news,
> Angelo Mariano
>
> --- In Firebird-Java@yahoogroups.com, "schroed1974 <schroed74@h...>"
> <schroed74@h...> wrote:
> > Hello,
> > I have always the same trouble passing from IB6/interclient to
> > FirebirdSQL/Jaybird (RC3) on win2000. All worked fine until I
> switched
> > from Interbase 6 to firebirdsql. Now Firebird works with simple
> > queries, but I get GDS exception with preparedSt
> atement.executeUpdate.
> > I tried also interclient with FBsql but I failed to get the
> connection
> > (IOException with socket input stream read).
> >
> > Here is a sample code:
> >
> > //firebirdsql.ConnectionTest.java
> > package firebirdsql;
> >
> > import java.sql.*;
> >
> > public class ConnectionTest {
> >
> > private String driver = "org.firebirdsql.jdbc.FBDriver";
> > private String url =
> > "jdbc:firebirdsql:localhost/3050:E:\\DATABASE\\WERSDB.gdb";
> > private String user = "sysdba";
> > private String pass = "masterkey";
> > private String insert = "INSERT INTO Z_SALES_AGENT
> > (AGENT_ID,AGENT_NAME,PASSWD,LICENSE_KEY) VALUES (?,?,?,?)";
> >
> > public ConnectionTest() {
> > }
> > public static void main(String[] args) {
> > ConnectionTest connectionTest1 = new ConnectionTest();
> > connectionTest1.startTest();
> > }
> >
> > private void verify(Connection conn)throws SQLException{
> > Statement st = conn.createStatement();
> > ResultSet rs = st.executeQuery("SELECT * FROM
> > while(rs.next()){http://docs.yahoo.com/info/terms/
> > System.out.println(rs.getString(1));
> > }
> > rs.close();
> > }
> >
> > private void startTest(){
> > //driver = "interbase.interclient.Driver";
> > //url = "jdbc:interbase://localhost/E:\\DATABASE\\WERSDB.gdb";
> > try {
> > Class.forName(driver).newInstance();
> > }
> > catch (Exception E) {
> > System.err.println("Unable to load driver.");
> > E.printStackTrace();
> > }
> > try{
> > Connection conn = DriverManager.getConnection(url, user,
> pass);
> > DatabaseMetaData mdata = conn.getMetaData();
> > ResultSet rs = mdata.getColumns(null,null,null,null);
> >
> > verify(conn);
> > PreparedStatement pr = conn.prepareStatement(insert);
> > pr.setString(1,"0000011321");
> > pr.setString(2, "BETA S.R.L.");
> > pr.setString(3, "PASS");
> > pr.setString(4, "APVtrialversion");
> > int res = pr.executeUpdate();
> > pr.close();
> > verify(conn);
> > System.out.println("Successfully connected! :"+res);
> > } catch (SQLException ex){
> > System.out.println("*");
> > ex.printStackTrace();
> > }
> > }
> > }
> >
> > Here is the sql create instruction:
> >
> >
> > /* Table: Z_SALES_AGENT, Owner: SYSDBA */
> >
> > CREATE TABLE Z_SALES_AGENT
> > (
> > AGENT_ID CHAR(10) NOT NULL,
> > AGENT_NAME CHAR(30),
> > PASSWD CHAR(10),
> > LICENSE_KEY CHAR(20),
> > CONSTRAINT PK_Z_SALES_AGENT1 PRIMARY KEY (AGENT_ID)
> > );
> >
> >
> > Here is the exception:
> >
> > org.firebirdsql.jdbc.FBSQLException: GDS Exception. Error reading
> data
> > from the connection.
> > null
> >
> > at
> > org.firebirdsql.jdbc.FBConnection.checkEndTransact
> > ion(FBConnection.java:1008)
> >
> > at
> > org.firebirdsql.jdbc.FBPreparedStatement.executeUp
> > date(FBPreparedStatement.java:143)
> >
> > at firebirdsql.ConnectionTest.startTest(ConnectionTest.java:50)
> >
> > *
> >
> > at firebirdsql.ConnectionTest.main(ConnectionTest.java:17)
> >
> > at org.firebirdsql.gds.GDSException: Error reading data from the
> > connection.
> > null
> >
> > at org.firebirdsql.jgds.GDS_Impl.receiveRespons
> e(GDS_Impl.java:1651)
> >
> > at
> > org.firebirdsql.jgds.GDS_Impl.isc_commit_transacti
> > on(GDS_Impl.java:542)
> >
> > at
> > org.firebirdsql.jca.FBManagedConnectionFactory.com
> > mit(FBManagedConnectionFactory.java:684)
> >
> > at
> > org.firebirdsql.jca.FBManagedConnection.internalCo
> > mmit(FBManagedConnection.java:410)
> >
> > at
> > org.firebirdsql.jca.FBLocalTransaction.internalCom
> > mit(FBLocalTransaction.java:156)
> >
> > at
> > org.firebirdsql.jdbc.FBConnection.checkEndTransact
> > ion(FBConnection.java:1004)
> >
> > at
> > org.firebirdsql.jdbc.FBPreparedStatement.executeUp
> > date(FBPreparedStatement.java:143)
> >
> > at firebirdsql.ConnectionTest.startTest(ConnectionTest.java:50)
> >
> > at firebirdsql.ConnectionTest.main(ConnectionTest.java:17)
> >
> >
> >
> >
> > Help me, please!
> >
> > Thanks in advance,
> > Angelo Mariano
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to