Using Access 2000 with SQL Server 2000.
I'm trying to insert a record into a table using a stored procedure
with a comma as decimal separator.
There is a textbox 'txtTariff' holding something like 1,234.
This will be stored as 1 ;-(
The field Tariff_NM is a Numeric(8,3) in SQL
The code (snippet) looks like this...
.Parameters.Append .CreateParameter("Tariff_NM", adNumeric, , ,
Me.txtTariff)
.Parameters("Tariff_NM").Precision = 8
.Parameters("Tariff_NM").NumericScale = 3
Any suggestions?
giorgio rancati - 09 Aug 2005 20:20 GMT
> Using Access 2000 with SQL Server 2000.
>
[quoted text clipped - 14 lines]
>
> Any suggestions?
The decimal separator in a textbox depend on regional setting.
Check the parameter datatype in stored procedure
----
Alter Procedyre dbo.MyProc
@Tariff_NM Numeric(8,3) --<<????
AS
UPDATE MYTABLE
SET Tariff_NM = @Tariff_NM
WHERE ................
----
Ciao Giorgio
Barry van Dijk - 10 Aug 2005 07:43 GMT
> > Using Access 2000 with SQL Server 2000.
> >
[quoted text clipped - 26 lines]
> SET Tariff_NM = @Tariff_NM
> WHERE ................
You're right! I've been looking at VBA all the time while the mistake was in
the SP. I declared it as just Numeric, without the (8,3). Thanks!