SQL Server Map Decimal to BCD
Posted: Wed 07 Oct 2020 21:03
I have a connection as below
UniConnection.DataTypeMap.AddDBTypeRule(msDecimal, 0, 0, ftBCD, 12, True);
The fields are created as BCDField working perfectly.
However, when making an "insert" the command is generated with float parameters and not as money.
exec sp_executesql N'INSERT INTO UniTeste
(n2, n4, n6, f)
VALUES
(@P1, @P2, @P3, @P4)',N'@P1 float,@P2 float,@P3 float,@P4 float',0.349999999999,0.349999999999,0.349999999999,0.349999999999
What configuration can I do to modify the parameters generated in the INSERT \ UPDATE commands com money datatype
?
Exemple:
exec sp_executesql N'INSERT INTO UniTeste
(n2, n4, n6, f)
VALUES
(@P1, @P2, @P3, @P4)',N'@P1 money,@P2 money,@P3 money,@P4 money',$0.3500,$0.3500,$0.3500,$0.3500
regards,
Fontenele
UniConnection.DataTypeMap.AddDBTypeRule(msDecimal, 0, 0, ftBCD, 12, True);
The fields are created as BCDField working perfectly.
However, when making an "insert" the command is generated with float parameters and not as money.
exec sp_executesql N'INSERT INTO UniTeste
(n2, n4, n6, f)
VALUES
(@P1, @P2, @P3, @P4)',N'@P1 float,@P2 float,@P3 float,@P4 float',0.349999999999,0.349999999999,0.349999999999,0.349999999999
What configuration can I do to modify the parameters generated in the INSERT \ UPDATE commands com money datatype
?
Exemple:
exec sp_executesql N'INSERT INTO UniTeste
(n2, n4, n6, f)
VALUES
(@P1, @P2, @P3, @P4)',N'@P1 money,@P2 money,@P3 money,@P4 money',$0.3500,$0.3500,$0.3500,$0.3500
regards,
Fontenele