if (size > 0) {
DBDriverHandler driverHandler =
dBDriverHandlerFactory.createDBDriverHandler(ps);
try {
for (int i = 0; i < size; i++) {
FieldMapping fieldMapping = (FieldMapping) columns.get(i);
int type = fieldMapping.getColumnType();
if (type == Types.CHAR || type == Types.VARCHAR) {
int len = fieldMapping.getColumnLength();
if (len > 0) {
driverHandler.defineColumnType(i + 1, type, len);
} else {
driverHandler.defineColumnType(i + 1, type);
}