|
-
Mar 23rd, 2002, 07:02 PM
#1
Thread Starter
Hyperactive Member
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...."
-
Mar 23rd, 2002, 11:50 PM
#2
Hyperactive Member
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:
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|