I found a mdac 2.8 bug.
I am using Windows 2000 SP3, VB6 SP5 and SQL Server 2000 SP3.
I select a table with a field of money type. If the field value is a large
negative value
( ex. -348000000000.1234), the select result will be
wrong((-122820018631.5986).
Can anyone verify whether this is a mdac 2.8 bug?
Jason Tost - 28 Dec 2004 23:11 GMT
> I found a mdac 2.8 bug.
> I am using Windows 2000 SP3, VB6 SP5 and SQL Server 2000 SP3.
[quoted text clipped - 3 lines]
> wrong((-122820018631.5986).
> Can anyone verify whether this is a mdac 2.8 bug?
Verify that the data is actually OK coming from your sql server to start
with, making sure that the data type you are using in your VB
application is large enough to handle the large negative currency type.
If nothing else, try using a double in your VB app to receive the
value from sql. I have seen problems with vb6 where a jscript passes a
number to a vb member property of type single, and vb freaks out about
it because of some kind of overflow condition, even when the numeric
value is well within the range of a single precision number in VB. In
this case changing all singles to doubles solved my problem.
Scott Huang - 29 Dec 2004 00:42 GMT
But the return value is OK when using mdac 2.7 or earlier version with the
same program.
> > I found a mdac 2.8 bug.
> > I am using Windows 2000 SP3, VB6 SP5 and SQL Server 2000 SP3.
[quoted text clipped - 13 lines]
> value is well within the range of a single precision number in VB. In
> this case changing all singles to doubles solved my problem.
Nobody - 29 Dec 2004 16:38 GMT
In your VB app, what is the data type you are trying to save the value to?
> But the return value is OK when using mdac 2.7 or earlier version with the
> same program.
[quoted text clipped - 17 lines]
> > value is well within the range of a single precision number in VB. In
> > this case changing all singles to doubles solved my problem.
Scott Huang - 30 Dec 2004 03:26 GMT
I use a variant to save the return value "GetRows" from the recordset.
]
> In your VB app, what is the data type you are trying to save the value to?
>
[quoted text clipped - 19 lines]
> > > value is well within the range of a single precision number in VB. In
> > > this case changing all singles to doubles solved my problem.
Ken Conner - 31 Mar 2005 08:29 GMT
The problem is in the cursor services, use server side cursors and it
dissappears. The variable it is stored in is not the problem, it is
definately a bug in the library.
It also does not apply to larger neg numbers, only to ones within a certain
range.
> I found a mdac 2.8 bug.
> I am using Windows 2000 SP3, VB6 SP5 and SQL Server 2000 SP3.
[quoted text clipped - 3 lines]
> wrong((-122820018631.5986).
> Can anyone verify whether this is a mdac 2.8 bug?