-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
hopper
-
x86
-
windows_2000
###@###.### 2002-01-31
J2SE Version (please include all output from java -version flag):
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)
Does this problem occur on J2SE 1.3? Yes / No (pick one)
No.
Operating System Configuration Information (be specific):
Windows 2000, Windows NT4
Hardware Configuration Information (be specific):
P3, 866 Mhz with 512 MB Ram or P2 400Mhz with 256 MB Ram
Bug Description:
When execute UpdateObject on a Memo column in MS Access, you will get a
OutOfMemoryException:
C:\>c:\j2sdk1.4.0-rc\bin\java UpdateRow
Exception in thread "main" java.lang.OutOfMemoryError
Also when use:
c:\j2sdk1.4.0-rc\bin\java -Xmx512m UpdateRow
Exception in thread "main" java.lang.OutOfMemoryError
Steps to Reproduce (be specific):
1. Create a ODBC DSN called "access2" to the attached Access database:
db_update.mdb
2. Execute my test program "UpdateRow" with b91 of JDK 1.4
Attached:
1) db_update.mdb (MS Access 2000)
2) test program UpdateRow.java
Test Program(UpdateRow.java)
-----------------------------
import java.sql.*;
public class UpdateRow
{
public static void main(String[] args)
{
Connection con = null;
PreparedStatement st = null;
ResultSet rs = null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
con = DriverManager.getConnection("jdbc:odbc:access2","admin","");
st = con.prepareStatement("SELECT * FROM table1", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
rs = st.executeQuery();
if (rs.next()){
rs.updateObject("c1", "this test string was written by UpdateObject." );
rs.updateRow();
}else System.out.println("no row");
}catch(Exception ex){
ex.printStackTrace();
}finally{
try{ rs.close();
}catch(Throwable e){}
try{ st.close();
}catch(Throwable e){}
try{ con.close();
}catch(Throwable e){}
}
}
}