Comma as Decimal separator

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Barry van Dijk said:
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?

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 ................
 
Barry van Dijk said:
messaggio news:[email protected]...

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 ................

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!
 
Back
Top