Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to speed up performance ado-query

15 views
Skip to first unread message

catharinus

unread,
Jun 15, 2007, 9:47:44 AM6/15/07
to
Hello to you all,

I have build an vb application that counts certain figures from
records in TABELA and puts the result in a field in a record in
TABELB. The statement is below.


If IsNull(conConnection.Execute("Select sum(Bedrag) from TABELA where
(bedrag<0)").Fields(0).Value) = False Then
cpBedragCredit = conConnection.Execute("Select sum(Bedrag)
from TABELA where bedrag<0") .Fields(0).Value
Call conConnection.Execute("Update TABELB set jar_cre='" &
Format(cpBedragCredit, "#0.00") & "' where reken=" & lclReken)
end if

The performance is pretty slow. Can anybody help me approve the
performance?
Thanks in advance

Catharinus van der Werf
www.figuresfirst.nl
csvand...@planet.nl

seasonedgeek

unread,
Jul 21, 2007, 11:31:27 AM7/21/07
to
> csvanderw...@planet.nl

Catharinus,

Use more variables. The code chaining effect is causing your code is
run much slower than otherwise coded.

Cheers,
SG

0 new messages