Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0
-
None
-
oracle 9i
Description
i use ddlutil to get insertSql for some tables .when the column type is number(1),SqlBulder.getValueAsString return's value is "ture",otherwise myvalue is "1",
it seems ddlutil think number(1) is bool. an other's issue is getValueAsString return's value is '123' when my value is 123.
i try fixed it in Oracle8Builder override getValueAsString,the code is
@Override
protected String getValueAsString(Column column, Object value) {
String result;
if (value == null)
switch(column.getTypeCode())
{
//number(1) type
case Types.BIT:
if("true".equals(value.toString()))
else
{result="0";} break;
case Types.INTEGER:
result = escapeStringValue(value.toString());
break;
case Types.NUMERIC:
result = escapeStringValue(value.toString());
break;
default:
result = super.getValueAsString(column, value);
}
return result;
}