Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / August 2005

Tip: Looking for answers? Try searching our database.

Comma as Decimal separator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barry van Dijk - 09 Aug 2005 16:34 GMT
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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.