Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and coursor
Message
From
19/04/2006 05:05:27
 
 
To
19/04/2006 04:50:12
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:
01114500
Views:
18
i have another problem after i add readwrite

i got error message
ZAP
c:\docum \\myusrname\\locals \temp\00003w95004x.temp?yes no

and if i press y or n my pc is stuck.

thanks
>Add "Readwrite" to the select statement where you create crsTemp.
>
>>hi,
>>thank you,
>>i got error message
>>Cannot update the cursor "crsTemp", since it is read-only.
>>
>>ldDate=date()
>>SELECT no,date1,count1 FROM trans1 into CURSOR crsTemp WHERE date1=ldDate
>>
>>ldDate=date()
>>SELECT no,date1,count1 FROM trans1 into CURSOR crsDummy WHERE date1=ldDate
>>Select crsTemp && Which controls the grid
>>zap
>>append from dbf('crsDummy')
>>thisform.grid1.refresh()
>>
>>thanks
>>
>>>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