Results 1 to 2 of 2

Thread: Double format

  1. #1

    Thread Starter
    Hyperactive Member sterankin's Avatar
    Join Date
    Jul 2001
    Location
    N.Ireland
    Posts
    336

    Double format

    Here is my sql to create a new table in the database, problem is in the "Result" field, which I want to be double format, i.e. the user should be able to enter numbers with decimal points, e.g. 1.56

    Problem is, after the table is created, when the user enters 1.56, it automatically gets rounded up or down!

    Why is this, and how can I solve it?

    ----------------------------------------------------

    cmd.CommandText = "CREATE TABLE " & txtSectorName.Text & " (TestNumber Long PRIMARY KEY, DateStarted Date, TestType Char(30), Result Double, DateFinished Date, SamplePoint Char(20), Sector Char(20), TestAddedBy Char(30), ResultEnteredBy Char(30))"

    -------------------------------------------------------------------------

    Result Double


    should that be something else, e.g. Result Integer ??


    thanks steven


    "The Dude abides...."

  2. #2
    Hyperactive Member Tequila_worm's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    344
    I dont know much about creating a table with sql, But if it rounds it of then you should use the correct format such as

    VB Code:
    1. aDouble = Format(####.###)

    Something like that i am not 100% sure though. But it has to do with Format.

Posting Permissions

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



Click Here to Expand Forum to Full Width