Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still problems with work areas
Message
De
23/05/2017 16:40:28
 
 
À
23/05/2017 16:19:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01651367
Message ID:
01651371
Vues:
63
>Hi,
>
>Thought I had this fixed but still not fixed in production. I have a form that contains a list of Word templates the users can pick that I then fire up the template in Word and pass in some data (from the current form). The list of templates is in a contained VFP table that has fields for template name, a field for a "when" expression (i.e. user can only run the template when the "when" condition evaluates to .t.) and then a field to hold the name of a procedure to convert the data into the form the template expects.
>
>e.g.
>
>lcTemplate = "Application Form x.dotm"
>
>lcWhenCondition = "RECCOUNT('apps') > 0"
>
>lcDataProcedure = "WorkUpAppData(v_Apps.App_ID)"
>
>To be able to use the overall process from form to form, many of the steps involved are in a "wrapper" class that is instantiated to a global object so I can use it all over the place. In this case, the wrapper procedure does all the basic things needed - checks that the template exits, fires up an instance of Word, creates a document from the template etc...).
>
>Problem:
>
>- on my Development machine, no errors in the overall process - ever. But when I move it to their network, I get "alias not found" errors all the time. It seems that something is making my process run "outside" of the current datasession such that it does not "see" the views that I am pulling data from. This can happen when I am either trying to EVALUATE() the "when" condition or "run" the data procedure.
>
>i.e. this works on my dev machine (lcWhenCondition as above)
>
>
>STORE EVALUATE(lcWhenCondition) TO llWhenOkay
>
>IF NOT llWhenOkay
>   * if not okay, alert user and return...
>   WAIT WINDOW (something)
>   RETURN .F.
>ENDIF
>
>
>I have tried to debug on the network by having a menu item that calls a built in "table/view viewer" - but it also "messes" with things as it is also a form that opens in its own datasession. When I invoke it and switch to the correct data session, all the tables and views are there that I require - so nothing is closing them.
>
>By rights nothing in my code should change the current data session - the code under the picklist is simple in that it picks up and passes the template name to my wrapper class method .CreateDocFromTemplate(). This wrapper class is a custom object (i.e. not a form) so that should not mess with the data session. I read through and no other object is called that changes the data session.
>
>I can also get this to work on the network if I "click around" on pages in the form that seem to somehow "force" the view to be found - even though the whole time the view shows as being open.
>
>Sign me, "stumped in Ontario".

When you say "...I get "alias not found" errors all the time" do you mean:

- you get these errors every time, or
- you get these errors intermittently but frequently
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform