Re: Strange calculation
- From: Jamie Collins <jamieuka@xxxxxxxxxxxxxx>
- Date: Fri, 05 Oct 2007 05:00:49 -0700
On Oct 3, 9:46 pm, "Ken Snell \(MVP\)"
<kthsneisll...@xxxxxxxxxxxxxxxxxx> wrote:
One more time - as soon as I try to store this value, it sets back to
434.090.
Starting to pull my hair out.
I've looked at the scale, precision anddecimalplaces fields for each of
the
number (decimal) data types, and they're all adequate to hold enough
decimals.
See my first reply to you in this thread....
Why, have you been able to reproduce the problem? I haven't and I'd
hesitate in prescribing a solution involving altering the design of
the table until I had.
FWIW I've seen similar errors where values with some characteristics
get truncated using ADO recordsets with certain cursor types (although
this doesn't appear to fit the OP's scenario) e.g.
Sub DecTrucErr()
Kill Environ$("temp") & "\DropMe.mdb"
Dim rs
Dim cat
Set cat = CreateObject("ADOX.Catalog")
cat.Create _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
Environ$("temp") & "\DropMe.mdb"
Set rs = cat.ActiveConnection.Execute( _
"SELECT 1.1 / 10;")
MsgBox rs.GetString
' Returns 0.11 -- correct
Dim con
Set con = CreateObject("ADODB.Connection")
With con
.ConnectionString = _
cat.ActiveConnection.ConnectionString
.CursorLocation = 3
.Open
Set rs = .Execute( _
"SELECT 1.1 / 10;")
MsgBox rs.GetString
' Returns 0.1 -- incorrect, truncated
End With
End Sub
Jamie.
--
.
- References:
- Strange calculation
- From: mbr96 via AccessMonster.com
- Re: Strange calculation
- From: mbr96 via AccessMonster.com
- Re: Strange calculation
- From: mbr96 via AccessMonster.com
- Re: Strange calculation
- From: mbr96 via AccessMonster.com
- Re: Strange calculation
- From: Ken Snell \(MVP\)
- Strange calculation
- Prev by Date: Re: multiple check boxes
- Next by Date: Re: continous forms and conditional formatting
- Previous by thread: Re: Strange calculation
- Next by thread: RE: Lost Formatting
- Index(es):
Relevant Pages
|