Hi. We've just encountered a very strange insert issue with Access 97 files, using the last 3-4 releases including v2.0.018. This was extremely hard to narrow down but we finally got it.
In this particular table we have, when the total length of all the strings on the insert is 233 characters, columns are shifted and garbage is inserted into the row. Adding or removing one or more characters from any string in the query makes it work. This does work for Access 2000 and 2003 files, but we need this for Access 97 as well. It also happens in other tables but with different total string lengths.
Here are the steps to reproduce:
Define table1 with columns A through P.
All columns are CHAR(200) except for B which is a long integer.
All columns should allow zero length.
This code will reproduce the error, and if you modify the string length of any of the strings in the insert it will work.
Class.forName("com.hxtt.sql.access.AccessDriver");
Connection c = DriverManager.getConnection("jdbc:access:/c:/jumbletest97.mdb");
Statement stmt = c.createStatement();
String insert =
"insert into table1(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) values (" +
"'A',885,'CCC','DDDDDDDDDDDDDDDDDDDDD','EEEEEEEEE','FFFFFFFFFFF'," +
"'GGGGGGGGGGGGGGGGGGGGGGGGGGGG','HHHHHH','III','JJJJ','KKKKKKKKKK','LLL'," +
"'MMMMMMMMMMMMM','NNNNNNNNNNNNNNNNNNNNNNNNNNN','OOOOOOOOOOOOOOOOOOOOOOOO'," +
"'PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP')";
stmt.executeUpdate(insert);
stmt.close();
c.close();
Thank you in advance.
|
Passted test with v2.0.21 . Please download it. It's a fixed bug on yesterday:) Thanks for your report.
|
That's twice you guys had a fix within hours of me posting the question.
I love the amazing support for this product!!!!
Thank you again.
|