Daniel John Debrunner wrote:
Kathey Marsden wrote:
For embedded,
public void *setObject*(int parameterIndex,
Object
<http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html> x,
int targetSqlType)
and
public void *setObject*(int parameterIndex,
Object
<http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html> x,
int targetSqlType,
int scale)
With a scale specified as zero
do not adjust the scale when the value is inserted into a double or
real column.
Javadoc for that method says:
scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
this is the number of digits after the decimal point. For all other
types, this value will be ignored.
So it seems that embedded is correct.
I called the method like this:
ps.setObject(2, value,java.sql.Types.DECIMAL,0);
|
Where the targetSqlType is defined as:
targetSqlType| - the SQL type (as defined in java.sql.Types) to be sent
to the database. The scale argument may further qualify this type.
But the final destination column is Double. Shouldn't a targetSqlType
of DECIMAL mean that the scale should apply?
Kathey