Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with View?
Message
De
08/02/2005 13:48:16
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
00979987
Message ID:
00984811
Vues:
17
Hi Jennifer,

>I didn't know about the _VFP.AutoYield command. That does sound like it could be the problem. I will try setting to .F. from within my form and see if that fixes the problem. I am not sure of the correct way to set this command? Do I just set it at the initialization of my form or do I need to do a DOEVENTS like some have mentioned on U.T.?
>

I knew you were going to ask questions <g>. It's been a while since I've messed with this stuff. When AutoYield is not set properly, you may see ActiveX events that don't fire or timing issues. I'm not sure of the best place to set it. You could do it in your application startup, but then it might affect other areas of the app. To do it at the form level, you probably need to set it in Form.Load (before the ActiveX control loads), then toggle it in Form.Activate/Deactivate.

When AutoYield = .F., VFP no longer processes Windows events between lines of VFP code. You should only have to call DoEvents if you want to force VFP to process those events. An example might be if you have a long process running and you want to refresh a progress bar. Be sure the look in the help file under both AutoYield and DoEvents for more detailed info.


>
>
>>Hi Jennifer,
>>
>>The problem may not be with your view. As you are no doubt aware, VFP does not always return the correct source code in the error handler. Often, I'll see the query that VFP generates internally from a view instead of the actual source code associated with the line number. You are better off troubleshooting the code using the method/line number returned by the error handler, which is usually correct.
>>
>>Regarding your problem, it looks like you might be using an ActiveX control. Have you set _VFP.AutoYield appropriately?
>>
>>>I am getting an intermittant error message when keying in a form and then clicking on the "NEXT" button to go to the next record. I don't get the error in my development directory but I am seeing it at the customer's site. I have a set of 75 records as our test data that we are using to TEST various fixes that I have tried. The last test I tried failed once in 2 out of the 3 keying trials. This is the first time I have tried LOCAL VIEWS in one of my applications so I don't know what the problem is. It seams to me like maybe the view is taking too long to update the database when the record pointer moves to the next record. Each time I get the error message I get different line numbers where it is failing but I am always seeing some Database update code in each of the errors. Here is how I have my "Update Criteria" set in my VIEW with 82 records.
>>>
>>>Send SQL Updates
>>>Update All
>>>Key and Modified Fields
>>>SQL Update
>>>
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform