Access VB6 sum bug

From: polym (mymail_at_nospam.com)
Date: 01/19/05


Date: Wed, 19 Jan 2005 19:06:04 +0200

I am using access database.
If i open access database and execute that query there is no problem.
But if i execute that query from vb6 i got incorrect results.

Here is my query :
SELECT SUM (a - b - c + d) as fark FROM mytable where mytype=1

I know that
Sum of a is 0 , sum of b is 0 , sum of d is 0.
sum of c is 3.
But in vb result is 11.
No meaning.
Like i said before if i execute query in access it results 3. ok.
But incorrect result in vb6.

If i execute SELECT SUM (a) , sub( b ) , sum( c ) , sum( d) FROM mytable
where bytype=1
in vb6 i got sum(c) as 3.

I habe vb6 with sp6. Operating system : windows 2003 enterprise server. i
applied online windows update.

I am using MDAC 2.7 sp1.

Did you get any bug like this?



Relevant Pages

  • Re: Access VB6 sum bug
    ... I can't reproduce any errors when summing multiple fields. ... > If i open access database and execute that query there is no problem. ... > But if i execute that query from vb6 i got incorrect results. ...
    (microsoft.public.vb.bugs)
  • Re: Query access database and get the count of a field
    ... developing an application in Vb6 which will open the access database ... and get the number of distinct materials. ... DISTINCT and then write a query on top of that one to do your count. ...
    (microsoft.public.vb.general.discussion)
  • Re: Query access database and get the count of a field
    ... developing an application in Vb6 which will open the access database ... and get the number of distinct materials. ... the general solution is to create a query that does a SELECT DISTINCT ...
    (microsoft.public.vb.general.discussion)
  • Which one is best performance?
    ... execute this command so that the datagrid gets its data. ... and I can make a Query in the MS Access 2003 for example and I can ... query from the C# or call a query from the Access dataBase? ...
    (microsoft.public.dotnet.languages.csharp)
  • Dynamicaly Create MSAccess Query in C#
    ... Been searching the net and can only find help for VB6. ... I need to dynamicaly create a query within C# for an Access database. ... This query will then be used for a Crystal Report. ...
    (microsoft.public.dotnet.csharp.general)

Loading