Reputation: 1
I got a problem. I have a .accdb data.(Access Data) My data column is called remark, size is more than 256byte.
I used odbc Driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(DB_URL, props);
PreparedStatement ps = conn.prepareSTatement("select * from test");
rs = ps.executeQuery();
while(rs.next()){
String remark = rs.getString("remark");
System.out.println(remark);
}
This logic get data truncated 255byte ;
what should I solve problem the limited character size on ODBC?
What can I do get data more than 255 bytes?
help me please, I appreciate it.
Upvotes: 0
Views: 537
Reputation: 42
use Jackcess!
I found solve the problem truncating 255byte at http://jackcess.sourceforge.net/
finally, i could get data more than 255 byte.
If Someone finding this problem, use jackcess
-announced part omitted-
Table table = db.getTable("TableName");
for(Row row :table){
for(Column column : table.getColumns()){
columnName = column.getName();
value=row.get(columnName);
ps.setString(index, String);
Upvotes: 1