Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4486195
Votes 4
Synopsis ResultSet.updateString() sets bytes of String incorrectly in the database.
Category jdbc:jdbc_odbc_bridge
Reported Against 1.3.1 , merlin-beta2 , merlin-beta3
Release Fixed 1.4(merlin-rc1)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4476228 , 4529713 , 4546083
Submit Date 31-JUL-2001
Description
The fix for this bug is available after b87 of merlin.




java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

The bug with bug id 4335564 doesn't seem to have been corrected. It says it has
been corrected in ladybird (must be v1.3.1, right?), but I still have problems
with national characters when using ResultSet.updateRow().
I am trying to update a database with characters like ?????, but they are saved
in the database with strange letters. It works fine if I do a normal UPDATE,
but ResultSet.rowUpdate() changes these characters.
(Review ID: 127924) 
======================================================================
Work Around




Use UPDATE statements but it is way slower than using ResultSet.rowUpdate() if
there is a lot of rows to update.
======================================================================
Evaluation
Sent to JDBC-India team

  xxxxx@xxxxx   2001-08-02

The bug is , actually, not as described in the Synopsis. There is no problem with charSet logic of the bridge. However Updatable ResultSets do fail when uses Binary/Byte updation, which is internally called in this bug examplle (JdbcOdbcResultSet.updateString) also.
Two problems are existing in the bug with respect to this. 

1) Odbc requires SQL_CURSOR_TYPE as a KEYSET_DRIVEN cursor (either SQL_CURSOR_DYNAMIC or SQL_CURSOR_KEYSET_DRIVEN) for an updatable resultset. 

Source: A similar error message is thrown if you try a resultset update with SQL_CURSOR_STATIC option and Microsoft Oracle Driver.

2) In JdbcOdbc.c, in bindColBinary method, pointers to data and databuffer are released. That is they are released before SQLSetPos call. This causes problem. They need to be released after SQLSetPos. 

I am trying to fix this now.

thanks,

  xxxxx@xxxxx   2001-08-22
Comments
  
  Include a link with my name & email   

Submitted On 05-NOV-2001
VBerlin
We have test it with the JDK 1.4.0 beta 3 now and it 
does'nt work. I think Sun is very fast with marking a bug 
as closed,fixed. This is not the first JDBC 2 bug that is 
mark as fix but isn't fix.



PLEASE NOTE: JDK6 is formerly known as Project Mustang