Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 Tags
Subject: RE: Totals in Buffer Mode
Thread ID: 112549 Message ID: 112558 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Grids
Date: Thursday, November 09, 2006 4:30:07 PM         
   


> With versions prior to VFP 9 you can't use agregate functions in SELECT - SQL (You can but all records comes from disk table not from buffered one). In VFP9 You can use:
>
> Select sum(qnty) from mytable WITH (BUFFERING=.t.) into array myarray 
> 

> Your only choice here is:
>
>
> SELECT MyBufferedTable
> SUM qnty TO lnQnty
> 

>
>
>
> > Hello experts
> >
> > Mytable.dbf having Dates,Qnty (n,6) fields.
> > In Entry form in i am using Mytable in buffer mode 5.
> >
> > I am using grid1 & pupulated with mytable
> >
> > On clicking "ADD" command-button I am adding new blank
> > record in grid and & user can put certain numering data as quantity.
> >
> > User goes on adding few records and At certain point user
> > may have total of Quantity fields which he have enterd.
> >
> > for this I am using :
> >
> > Select sum(qnty) into array myarray from mytable
> >
> > but it shows total of all Qnty in the file (not of current records
> > which yet not saved from buffer to table )
> >
> > whats wrong????
> > is there any better way????
> >
> > Please help
> >
> >
> >
> >
> > new to vfp

>
>
>
> Borislav Borissov
>
>


Borislav,

I do not believe that Binod has the WITH BUFFERING clause in VFP 6.

Ken

You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Totals in Buffer Mode Posted by Binod Binani @ 11/9/2006 3:14:44 PM
RE: Totals in Buffer Mode Posted by Frank Cazabon @ 11/9/2006 3:23:17 PM
RE: Totals in Buffer Mode Posted by Borislav Borissov @ 11/9/2006 3:24:06 PM
RE: Totals in Buffer Mode Posted by Ken Murphy @ 11/9/2006 4:30:07 PM
RE: Totals in Buffer Mode Posted by Borislav Borissov @ 11/9/2006 6:58:51 PM
RE: Totals in Buffer Mode Posted by Ken Murphy @ 11/9/2006 9:04:48 PM
RE: Totals in Buffer Mode Posted by Ken Murphy @ 11/9/2006 4:36:39 PM