Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and coursor
Message
From
19/04/2006 04:30:10
 
 
To
19/04/2006 04:10:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114491
Message ID:
01114495
Views:
26
I have a few tips for you.
1. Never, never, never use "where something=function()", because this means that the function must be executed for every single record, and will take a looong time.
SELECT no,date1,count1 FROM emp into CURSOR crsTemp WHERE date1=DATE() &&will take a looong time
ldDate=date()
SELECT no,date1,count1 FROM emp into CURSOR crsTemp WHERE date1=ldDate && Will be fast, especially if you have an index tag on date1
2. Never select directly into the cursor which controls the grid! Use this solution
ldDate=date()
SELECT no,date1,count1 FROM emp into CURSOR crsDummy WHERE date1=ldDate
Select crsTemp && Which controls the grid
zap
append from dbf('crsDummy')
yourgrid.refresh()
3. Try to remember the tips we give you...! :-)

>hi all,
>
>any idea,i got empty grid via this code
>
>&& myform-->event-->activate
>SELECT no,date1,count1 FROM emp into CURSOR crsTemp WHERE date1=DATE()
>brow&& ok
>****mygrid1.ControlSource=crsTemp.no,count1,date1
>thisform.grid1.refresh && empty grid
>
>thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform