Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: ADP - Inserting a Decimal using a Stored proc

    I am inserting records using a stored procedure.

    One of the parameters is @testdecimal

    I have a form with a texbox named me.testdecimal

    If I type in 18.50 and run the stored procedure to insert the record, the table shows 19

    how can I insert the exact number that is entered in the textbox?
    the text values are inserting properly?

    I also have another paremeter called @testcurrency - I get an error when I include that

    the code I am using is below

    ---begin code

    Dim strSQL As String

    'Execute the Stored Procedure and Set the Parameters to the Textboxes on the Form

    strSQL = "Exec spInsertTestItem '" & Me.testtext & "','" & Me.testid & "','" & Me.testdecimal & "'"

    CurrentProject.Connection.Execute strSQL

    ----end code

    Thanks - AB

  2. #2
    Join Date
    Jul 2003
    Is it possible that the data type for the passed in parameter in your SpRoc is set to integer instead of decimal?

    I don't think the format, decimal places, or input mask for an unbound textbox on a form should have any bearing on this, but try tweaking those, too.
    Inspiration Through Fermentation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts