Loading ...
Sorry, an error occurred while loading the content.

Strange errors with JDBC driver

Expand Messages
  • Jan Aleman
    I have three strange errors with the new JDBC driver. Any help is appreciated. 1) crash on second row sql select ORDERID from ORDERS order by ORDERID sql
    Message 1 of 18 , May 1, 2002
    • 0 Attachment
      I have three strange errors with the new JDBC driver.
      Any help is appreciated.

      1) crash on second row
      sql select ORDERID from ORDERS order by ORDERID
      sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
      SHIPCOUNTRY from ORDERS where ORDERID = ?
      questiondata[0] 10248
      sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
      SHIPCOUNTRY from ORDERS where ORDERID = ?
      questiondata[0] 10249
      java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
      arithmetic exception, numeric overflow, or string truncation
      Cannot transliterate character between character sets
      java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
      arithmetic exception, numeric overflow, or string truncation
      Cannot transliterate character between character sets
      at
      org.firebirdsql.jdbc.FBResultSet$FBStatementFetcher.next(FBResultSet.jav
      a:2535)
      at org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:157)
      at com.servoy.j2db.dataprocessing.DataSet.<init>(DataSet.java:92)
      at
      com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:90)
      at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
      Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at
      sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at
      sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
      va:701)
      at java.lang.Thread.run(Thread.java:536)
      at
      sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRem
      oteCall.java:247)
      at
      sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223
      )
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      at com.servoy.j2db.dataprocessing.SQLEngine_Stub.performQuery(Unknown
      Source)
      at
      com.servoy.j2db.dataprocessing.FoundSet.queryForState(FoundSet.java:123)
      at com.servoy.j2db.dataprocessing.FoundSet.getState(FoundSet.java:108)
      at
      com.servoy.j2db.dataprocessing.FoundSet.getElementAt(FoundSet.java:254)
      at com.servoy.j2db.FormPanel.valueChanged(FormPanel.java:403)
      at
      com.servoy.j2db.RecordViewController.fireListSelectionChanged(RecordView
      Controller.java:112)
      at
      com.servoy.j2db.RecordViewController.stateChanged(RecordViewController.j
      ava:85)
      at javax.swing.JSlider.fireStateChanged(JSlider.java:343)
      at javax.swing.JSlider$ModelListener.stateChanged(JSlider.java:271)
      at
      javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRang
      eModel.java:346)
      at
      javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRa
      ngeModel.java:283)
      at
      javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(DefaultBoundedR
      angeModel.java:212)
      at javax.swing.JSlider.setValueIsAdjusting(JSlider.java:515)
      at
      javax.swing.plaf.basic.BasicSliderUI$TrackListener.mouseReleased(BasicSl
      iderUI.java:1303)
      at java.awt.Component.processMouseEvent(Component.java:5021)
      at java.awt.Component.processEvent(Component.java:4818)
      at java.awt.Container.processEvent(Container.java:1380)
      at java.awt.Component.dispatchEventImpl(Component.java:3526)
      at java.awt.Container.dispatchEventImpl(Container.java:1437)
      at java.awt.Component.dispatchEvent(Component.java:3367)
      at
      java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
      at java.awt.Container.dispatchEventImpl(Container.java:1423)
      at java.awt.Window.dispatchEventImpl(Window.java:1566)
      at java.awt.Component.dispatchEvent(Component.java:3367)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
      at
      java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
      d.java:190)
      at
      java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
      java:144)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
      java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
      arithmetic exception, numeric overflow, or string truncation
      Cannot transliterate character between character sets

      2) Absoluty no idea
      sql select ORDERID from ORDERS order by ORDERID
      sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
      SHIPCOUNTRY from ORDERS where ORDERID in
      (10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258,10259
      ,10260,10261,10262,10263,10264,10265,10266,10267)
      java.sql.SQLException: problem closing resultset:
      org.firebirdsql.gds.GDSException: request synchronization error
      java.sql.SQLException: problem closing resultset:
      org.firebirdsql.gds.GDSException: request synchronization error
      at org.firebirdsql.jdbc.FBStatement.closeResultSet(FBStatement.java:855)
      at
      org.firebirdsql.jdbc.FBResultSet$FBStatementFetcher.close(FBResultSet.ja
      va:2540)
      at org.firebirdsql.jdbc.FBResultSet.close(FBResultSet.java:178)
      at com.servoy.j2db.dataprocessing.DataSet.<init>(DataSet.java:199)
      at
      com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:90)
      at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
      Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at
      sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at
      sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
      va:701)
      at java.lang.Thread.run(Thread.java:536)
      java.sql.SQLException: problem closing resultset:
      org.firebirdsql.gds.GDSException: request synchronization error

      3)
      When using SQL 'in' and all the requested rows exist only 1 is returned!
    • David Jencks
      There s something wrong with how you are specifying the character set somewhere. I hope one of the two experts on this will tell you what;-) david jencks
      Message 2 of 18 , May 1, 2002
      • 0 Attachment
        There's something wrong with how you are specifying the character set
        somewhere. I hope one of the two experts on this will tell you what;-)

        david jencks

        On 2002.05.01 09:56:30 -0400 Jan Aleman wrote:
        > I have three strange errors with the new JDBC driver.
        > Any help is appreciated.
        >
        > 1) crash on second row
        > sql select ORDERID from ORDERS order by ORDERID
        > sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
        > SHIPCOUNTRY from ORDERS where ORDERID = ?
        > questiondata[0] 10248
        > sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
        > SHIPCOUNTRY from ORDERS where ORDERID = ?
        > questiondata[0] 10249
        > java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
        > arithmetic exception, numeric overflow, or string truncation
        > Cannot transliterate character between character sets
        > java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
        > arithmetic exception, numeric overflow, or string truncation
        > Cannot transliterate character between character sets
        > at
        > org.firebirdsql.jdbc.FBResultSet$FBStatementFetcher.next(FBResultSet.jav
        > a:2535)
        > at org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:157)
        > at com.servoy.j2db.dataprocessing.DataSet.<init>(DataSet.java:92)
        > at
        > com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:90)
        > at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        > at
        > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
        > Impl.java:25)
        > at java.lang.reflect.Method.invoke(Method.java:324)
        > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        > at sun.rmi.transport.Transport$1.run(Transport.java:148)
        > at java.security.AccessController.doPrivileged(Native Method)
        > at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        > at
        > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        > at
        > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
        > va:701)
        > at java.lang.Thread.run(Thread.java:536)
        > at
        > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRem
        > oteCall.java:247)
        > at
        > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223
        > )
        > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
        > at com.servoy.j2db.dataprocessing.SQLEngine_Stub.performQuery(Unknown
        > Source)
        > at
        > com.servoy.j2db.dataprocessing.FoundSet.queryForState(FoundSet.java:123)
        > at com.servoy.j2db.dataprocessing.FoundSet.getState(FoundSet.java:108)
        > at
        > com.servoy.j2db.dataprocessing.FoundSet.getElementAt(FoundSet.java:254)
        > at com.servoy.j2db.FormPanel.valueChanged(FormPanel.java:403)
        > at
        > com.servoy.j2db.RecordViewController.fireListSelectionChanged(RecordView
        > Controller.java:112)
        > at
        > com.servoy.j2db.RecordViewController.stateChanged(RecordViewController.j
        > ava:85)
        > at javax.swing.JSlider.fireStateChanged(JSlider.java:343)
        > at javax.swing.JSlider$ModelListener.stateChanged(JSlider.java:271)
        > at
        > javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRang
        > eModel.java:346)
        > at
        > javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRa
        > ngeModel.java:283)
        > at
        > javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(DefaultBoundedR
        > angeModel.java:212)
        > at javax.swing.JSlider.setValueIsAdjusting(JSlider.java:515)
        > at
        > javax.swing.plaf.basic.BasicSliderUI$TrackListener.mouseReleased(BasicSl
        > iderUI.java:1303)
        > at java.awt.Component.processMouseEvent(Component.java:5021)
        > at java.awt.Component.processEvent(Component.java:4818)
        > at java.awt.Container.processEvent(Container.java:1380)
        > at java.awt.Component.dispatchEventImpl(Component.java:3526)
        > at java.awt.Container.dispatchEventImpl(Container.java:1437)
        > at java.awt.Component.dispatchEvent(Component.java:3367)
        > at
        > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
        > at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
        > at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
        > at java.awt.Container.dispatchEventImpl(Container.java:1423)
        > at java.awt.Window.dispatchEventImpl(Window.java:1566)
        > at java.awt.Component.dispatchEvent(Component.java:3367)
        > at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        > at
        > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
        > d.java:190)
        > at
        > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
        > java:144)
        > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
        > at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
        > java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
        > arithmetic exception, numeric overflow, or string truncation
        > Cannot transliterate character between character sets
        >
        > 2) Absoluty no idea
        > sql select ORDERID from ORDERS order by ORDERID
        > sql select ORDERID, SHIPVIA, SHIPNAME, SHIPCITY, SHIPADDRESS,
        > SHIPCOUNTRY from ORDERS where ORDERID in
        > (10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258,10259
        > ,10260,10261,10262,10263,10264,10265,10266,10267)
        > java.sql.SQLException: problem closing resultset:
        > org.firebirdsql.gds.GDSException: request synchronization error
        > java.sql.SQLException: problem closing resultset:
        > org.firebirdsql.gds.GDSException: request synchronization error
        > at org.firebirdsql.jdbc.FBStatement.closeResultSet(FBStatement.java:855)
        > at
        > org.firebirdsql.jdbc.FBResultSet$FBStatementFetcher.close(FBResultSet.ja
        > va:2540)
        > at org.firebirdsql.jdbc.FBResultSet.close(FBResultSet.java:178)
        > at com.servoy.j2db.dataprocessing.DataSet.<init>(DataSet.java:199)
        > at
        > com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:90)
        > at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        > at
        > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
        > Impl.java:25)
        > at java.lang.reflect.Method.invoke(Method.java:324)
        > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        > at sun.rmi.transport.Transport$1.run(Transport.java:148)
        > at java.security.AccessController.doPrivileged(Native Method)
        > at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        > at
        > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        > at
        > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
        > va:701)
        > at java.lang.Thread.run(Thread.java:536)
        > java.sql.SQLException: problem closing resultset:
        > org.firebirdsql.gds.GDSException: request synchronization error
        >
        > 3)
        > When using SQL 'in' and all the requested rows exist only 1 is returned!
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > Firebird-Java-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
        >
        >
        >
      • Ken Richard
        The key message is: java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException: arithmetic exception, numeric overflow, or string truncation Cannot
        Message 3 of 18 , May 1, 2002
        • 0 Attachment
          The key message is:

          java.sql.SQLException: fetch problem: org.firebirdsql.gds.GDSException:
          arithmetic exception, numeric overflow, or string truncation
          Cannot transliterate character between character sets

          Try setting the connection property lc_ctype to "NONE" or to the
          character set that you are using in the database.


          -----Original Message-----
          From: Jan Aleman [mailto:jaleman@...]
          Sent: Wednesday, May 01, 2002 9:57 AM
          To: Firebird-Java@yahoogroups.com
          Subject: [Firebird-Java] Strange errors with JDBC driver

          I have three strange errors with the new JDBC driver.
          Any help is appreciated.
        • Jan Aleman
          Thanks, I guess that will solve problem 1, what about 2 and 3 ? And: is it possible to set the char set using a URL? The app I m using only supports driver and
          Message 4 of 18 , May 1, 2002
          • 0 Attachment
            Thanks, I guess that will solve problem 1, what about 2 and 3 ?

            And: is it possible to set the char set using a URL? The app I'm using
            only supports driver and URL currently, not properties.

            Jan Aleman

            > -----Original Message-----
            > From: Ken Richard [mailto:kenr@...]
            > Sent: Wednesday, May 01, 2002 4:30 PM
            > To: Firebird-Java@yahoogroups.com
            > Subject: RE: [Firebird-Java] Strange errors with JDBC driver
            >
            >
            > The key message is:
            >
            > java.sql.SQLException: fetch problem:
            > org.firebirdsql.gds.GDSException: arithmetic exception,
            > numeric overflow, or string truncation Cannot transliterate
            > character between character sets
            >
            > Try setting the connection property lc_ctype to "NONE" or to
            > the character set that you are using in the database.
            >
            >
            > -----Original Message-----
            > From: Jan Aleman [mailto:jaleman@...]
            > Sent: Wednesday, May 01, 2002 9:57 AM
            > To: Firebird-Java@yahoogroups.com
            > Subject: [Firebird-Java] Strange errors with JDBC driver
            >
            > I have three strange errors with the new JDBC driver.
            > Any help is appreciated.
            >
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            > ---------------------~--> Tied to your PC? Cut Loose and Stay
            > connected with Yahoo! Mobile
            > http://us.click.yahoo.com/QBCcSD/o1CEAA/yigFAA/saFol> B/TM
            >
            >
            > --------------------------------------------------------------
            > -------~->
            >
            > To unsubscribe from this group, send an email to:
            > Firebird-Java-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >
          • Ken Richard
            The driver seems to get out-of-state once there are character set issues. In my tests I have seen that some character set errors do not throw exceptions.
            Message 5 of 18 , May 1, 2002
            • 0 Attachment
              The driver seems to get out-of-state once there are character set
              issues.

              In my tests I have seen that some character set errors do not throw
              exceptions. Instead, the next() method returns false even when there
              are additional rows available. Then you will start getting gds
              synchronization errors when closing statements and resultsets.

              I believe that if you fix the character set problem that the other two
              will go away.

              -----Original Message-----
              From: Jan Aleman [mailto:jaleman@...]
              Sent: Wednesday, May 01, 2002 1:58 PM
              To: Firebird-Java@yahoogroups.com
              Subject: RE: [Firebird-Java] Strange errors with JDBC driver

              Thanks, I guess that will solve problem 1, what about 2 and 3 ?

              And: is it possible to set the char set using a URL? The app I'm using
              only supports driver and URL currently, not properties.

              Jan Aleman
            • Jan Aleman
              What troubles me is that you allways need to specify your character set, why doesn t the driver find out in which characterset the database is and switch to
              Message 6 of 18 , May 2, 2002
              • 0 Attachment
                What troubles me is that you allways need to specify your character set,
                why doesn't the driver find out in which characterset the database is
                and switch to it? How can one make a Java application that is supposed
                to talk to multiple databases and has to be transportable?

                I'm also troubled by the fact that I don't see how to set the
                characterset using a database URL instead of a properties object. Any
                information on that?

                Thanks for helping me out so far.

                Jan Aleman

                > -----Original Message-----
                > From: Ken Richard [mailto:kenr@...]
                > Sent: Wednesday, May 01, 2002 8:21 PM
                > To: Firebird-Java@yahoogroups.com
                > Subject: RE: [Firebird-Java] Strange errors with JDBC driver
                >
                >
                > The driver seems to get out-of-state once there are character
                > set issues.
                >
                > In my tests I have seen that some character set errors do not
                > throw exceptions. Instead, the next() method returns false
                > even when there are additional rows available. Then you will
                > start getting gds synchronization errors when closing
                > statements and resultsets.
                >
                > I believe that if you fix the character set problem that the
                > other two will go away.
                >
                > -----Original Message-----
                > From: Jan Aleman [mailto:jaleman@...]
                > Sent: Wednesday, May 01, 2002 1:58 PM
                > To: Firebird-Java@yahoogroups.com
                > Subject: RE: [Firebird-Java] Strange errors with JDBC driver
                >
                > Thanks, I guess that will solve problem 1, what about 2 and 3 ?
                >
                > And: is it possible to set the char set using a URL? The app
                > I'm using only supports driver and URL currently, not properties.
                >
                > Jan Aleman
                >
                >
                >
                >
                > ------------------------ Yahoo! Groups Sponsor
                > ---------------------~--> Tied to your PC? Cut Loose and Stay
                > connected with Yahoo! Mobile
                > http://us.click.yahoo.com/QBCcSD/o1CEAA/yigFAA/saFol> B/TM
                >
                >
                > --------------------------------------------------------------
                > -------~->
                >
                > To unsubscribe from this group, send an email to:
                > Firebird-Java-unsubscribe@yahoogroups.com
                >
                >
                >
                > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                >
                >
              • rrokytskyy
                ... Not always. Charset is automatically selected using your file.encoding property. Probably, in the nearest future I will switch it to NONE as default
                Message 7 of 18 , May 2, 2002
                • 0 Attachment
                  > What troubles me is that you allways need to specify your character
                  > set, why doesn't the driver find out in which characterset the
                  > database is and switch to it? How can one make a Java application
                  > that is supposed to talk to multiple databases and has to be
                  > transportable?

                  Not always. Charset is automatically selected using your
                  file.encoding property. Probably, in the nearest future I will switch
                  it to "NONE" as default encoding.

                  Database charset should not be used as the default (also I doubt that
                  it is possible) because there might be situation when this would not
                  be acceptable (default DB charset is NONE, but some fields are
                  defined with non-NONE chaset, then you get transliteration problems).

                  > I'm also troubled by the fact that I don't see how to set the
                  > characterset using a database URL instead of a properties object.
                  > Any information on that?

                  No chance. Currently properties encoded in URL are not supported. If
                  you wish you can add this feature to your code, and I will commit it
                  to main tree if everything is ok.

                  Best regards,
                  Roman Rokytskyy
                • Jan Aleman
                  Ok, I ll work on the URL thing as that s quite usefull, most java apps prefer to connect using just driver and URL I still don t understand why you allways
                  Message 8 of 18 , May 3, 2002
                  • 0 Attachment
                    Ok, I'll work on the URL thing as that's quite usefull, most java apps
                    prefer to connect using just driver and URL

                    I still don't understand why you allways have to specify the
                    characterset, defaulting to the charset a database is in when not
                    specified looks like a very natural option to me.

                    Jan Aleman

                    > -----Original Message-----
                    > From: rrokytskyy [mailto:rrokytskyy@...]
                    > Sent: Thursday, May 02, 2002 12:41 PM
                    > To: Firebird-Java@yahoogroups.com
                    > Subject: [Firebird-Java] Re: Strange errors with JDBC driver
                    >
                    >
                    > > What troubles me is that you allways need to specify your character
                    > > set, why doesn't the driver find out in which characterset the
                    > > database is and switch to it? How can one make a Java application
                    > > that is supposed to talk to multiple databases and has to be
                    > > transportable?
                    >
                    > Not always. Charset is automatically selected using your
                    > file.encoding property. Probably, in the nearest future I will switch
                    > it to "NONE" as default encoding.
                    >
                    > Database charset should not be used as the default (also I doubt that
                    > it is possible) because there might be situation when this would not
                    > be acceptable (default DB charset is NONE, but some fields are
                    > defined with non-NONE chaset, then you get transliteration problems).
                    >
                    > > I'm also troubled by the fact that I don't see how to set the
                    > > characterset using a database URL instead of a properties
                    > object. Any
                    > > information on that?
                    >
                    > No chance. Currently properties encoded in URL are not supported. If
                    > you wish you can add this feature to your code, and I will commit it
                    > to main tree if everything is ok.
                    >
                    > Best regards,
                    > Roman Rokytskyy
                    >
                    >
                    > ------------------------ Yahoo! Groups Sponsor
                    > ---------------------~--> Tied to your PC? Cut Loose and Stay
                    > connected with Yahoo! Mobile
                    > http://us.click.yahoo.com/QBCcSD/o1CEAA/sXBHAA/saFo> lB/TM
                    >
                    >
                    > --------------------------------------------------------------
                    > -------~->
                    >
                    > To unsubscribe from this group, send an email to:
                    > Firebird-Java-unsubscribe@yahoogroups.com
                    >
                    >
                    >
                    > Your use of Yahoo! Groups is subject to
                    > http://docs.yahoo.com/info/terms/
                    >
                    >
                  • rrokytskyy
                    Thanks for help! ... According to Firebird/InterBase API, if you do not specify charset in DPB (database parameters buffer), it is defaulted to NONE by
                    Message 9 of 18 , May 3, 2002
                    • 0 Attachment
                      Thanks for help!

                      > I still don't understand why you allways have to specify the
                      > characterset, defaulting to the charset a database is in when not
                      > specified looks like a very natural option to me.

                      According to Firebird/InterBase API, if you do not specify charset in
                      DPB (database parameters buffer), it is defaulted to NONE by database
                      server. And if you have some non-NONE columns, getting/setting data
                      there will cause server to perform transliteration. Also I do not
                      know if there's any way to get database charset before making a
                      connection.

                      Best regards,
                      Roman Rokytskyy
                    • Marczisovszky Daniel
                      r Thanks for help! ... It is interesting to read how IC handles this: http://www.aoindustries.com/docs/interclient/help/icCharacters.html By the way, soon
                      Message 10 of 18 , May 3, 2002
                      • 0 Attachment
                        r> Thanks for help!

                        >> I still don't understand why you allways have to specify the
                        >> characterset, defaulting to the charset a database is in when not
                        >> specified looks like a very natural option to me.

                        It is interesting to read how IC handles this:
                        http://www.aoindustries.com/docs/interclient/help/icCharacters.html

                        By the way, soon I'll make some tests about this conversions. I'll use
                        Delphi, because with that really low-level methods can be accessed
                        easily.

                        r> According to Firebird/InterBase API, if you do not specify charset in
                        r> DPB (database parameters buffer), it is defaulted to NONE by database
                        r> server. And if you have some non-NONE columns, getting/setting data
                        r> there will cause server to perform transliteration.

                        The link above says no transliteration is performed when NONE is set,
                        but I will check it :)

                        r> Also I do not know if there's any way to get database charset
                        r> before making a connection.

                        I'll try to check this.

                        Best wishes,
                        Daniel
                      • rrokytskyy
                        ... you can try following: create table( national_encoding varchar(20) character set , none_encoding varchar(20) character set NONE ) and
                        Message 11 of 18 , May 3, 2002
                        • 0 Attachment
                          > The link above says no transliteration is performed when NONE is
                          > set, but I will check it :)

                          you can try following:

                          create table(
                          national_encoding varchar(20) character set <CHARSET_YOU_LIKE>,
                          none_encoding varchar(20) character set NONE
                          )

                          and then try to insert your national characters into
                          national_encoding with NONE charset for client connection. You will
                          get exception (at least this is true for WIN1251).

                          > I'll try to check this.

                          Personally I see no need for this. I doubt that any C/C++/Delphi
                          library does this, so why should we?

                          Best regards,
                          Roman Rokytskyy
                        • Jan Aleman
                          ... Ok, we ve added that are testing it currently and will submit it to you. Thanks to this addition also generic SQL tools (like the Excellent Squirrel tool)
                          Message 12 of 18 , May 6, 2002
                          • 0 Attachment
                            > No chance. Currently properties encoded in URL are not supported. If
                            > you wish you can add this feature to your code, and I will commit it
                            > to main tree if everything is ok.

                            Ok, we've added that are testing it currently and will submit it to you.
                            Thanks to this addition also generic SQL tools (like the Excellent
                            Squirrel tool) can be used with Firebird.

                            I am still experiencing strange behaviour.

                            Example:

                            Firebird database: UNICODE_FSS
                            Lc_ctype: UNICODE_FSS

                            I insert the character é into a varchar

                            If I look at the data using ibconsole it looks good, If I retrieve it in
                            a Java application I see a square symbol and not é

                            If I do the above with WIN1252 it works properly. What am I doing wrong?


                            Jan Aleman
                          • rrokytskyy
                            ... Thanks, I received your code, and will check it today or tomorrow, and will commit to CVS. ... be sure that it is lc_ctype , not Lc_ctype . All supported
                            Message 13 of 18 , May 6, 2002
                            • 0 Attachment
                              > Ok, we've added that are testing it currently and will submit it to
                              > you. Thanks to this addition also generic SQL tools (like the
                              > Excellent Squirrel tool) can be used with Firebird.

                              Thanks, I received your code, and will check it today or tomorrow,
                              and will commit to CVS.

                              > Firebird database: UNICODE_FSS
                              > Lc_ctype: UNICODE_FSS

                              be sure that it is "lc_ctype", not "Lc_ctype". All supported
                              connection properties are case sensitive.

                              > If I look at the data using ibconsole it looks good, If I retrieve
                              > it in a Java application I see a square symbol and not é

                              Can it be issue with font in swing application? Can you try some
                              other Swing tools like JDBC Explorer from Borland (unfortunatelly you
                              can get it only as part of BAS or JBuilder).

                              Best regards,
                              Roman Rokytskyy
                            • Jan Aleman
                              ... Great. ... Yes, it was my friendly outlook that decided that lines should start with caps, luckily my IDE (Eclipse) doesn t share that opinion :-) ... I m
                              Message 14 of 18 , May 6, 2002
                              • 0 Attachment
                                > > Ok, we've added that are testing it currently and will submit it to
                                > > you. Thanks to this addition also generic SQL tools (like the
                                > > Excellent Squirrel tool) can be used with Firebird.
                                >
                                > Thanks, I received your code, and will check it today or tomorrow,
                                > and will commit to CVS.

                                Great.

                                >
                                > > Firebird database: UNICODE_FSS
                                > > Lc_ctype: UNICODE_FSS
                                >
                                > be sure that it is "lc_ctype", not "Lc_ctype". All supported
                                > connection properties are case sensitive.

                                Yes, it was my friendly outlook that decided that lines should start
                                with caps, luckily my IDE (Eclipse) doesn't share that opinion :-)

                                > > If I look at the data using ibconsole it looks good, If I retrieve
                                > > it in a Java application I see a square symbol and not é
                                >
                                > Can it be issue with font in swing application? Can you try some
                                > other Swing tools like JDBC Explorer from Borland (unfortunatelly you
                                > can get it only as part of BAS or JBuilder).

                                I'm quite sure this is not an font issue for several reasons:
                                -I'm not aware of any font that doesn't contain the é character
                                -If I use win1252 the character shows properly
                                -If I insert the character in the same applications it looks good at
                                insert time but square at select time
                                -I've tested this on 4 different machines (all windows XP/2000 though)

                                Jan Aleman
                              Your message has been successfully submitted and would be delivered to recipients shortly.