Re: Access VB6 sum bug

From: Veign (NOSPAMinveign_at_veign.com)
Date: 01/19/05


Date: Wed, 19 Jan 2005 14:02:05 -0500

I can't reproduce any errors when summing multiple fields. What are the
data types of the fields in question?

-- 
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
"polym" <mymail@nospam.com> wrote in message
news:O25orkk$EHA.2016@TK2MSFTNGP15.phx.gbl...
> 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

  • Access VB6 sum bug
    ... 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: Finally which ORM tool?
    ... manipulate the linq query IF you're executing it at that moment. ... simply because the declaration construction was with 'CHOPS'. ... implement IEnumerablebut had an Execute() method which gave back ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: SQL stored procedure executing twice
    ... I wasn't aware that DLookupwould execute the "domain" more than once. ... caused the stored procedure to execute twice. ... Dim stDocName As String ... My pass-thru query properties ...
    (microsoft.public.access.modulesdaovba)
  • Re: Clarification on DBI module
    ... You get the same results for the second execute because the record buffer in the statment handle is not cleaned out because no execute took place. ... The sql query can have bind variables or they may not have. ... Ahhh...imagining that irresistible "new car" smell? ...
    (perl.dbi.users)
  • RE: Running action function from SELECT query
    ... Yes ADO can execute queries saved in an Access database. ... I do not know how ADO.NET works, but the developer tells me he is able to ... At any rate, I can call just a function from a query, like this: ...
    (microsoft.public.access.modulesdaovba)

Loading