Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making PHDBase work under ExecScript()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01238479
Message ID:
01238686
Vues:
25
Most likely the FLL is not being found or you don't have permissions to read it... If you're using COM interop you will be running in the context of the IIS worker process and your paths and locations for files etc. will be all out of whack.

You're probably missing the error message because of the Execscript wrapping.

+++ Rick ---

>>I am completing the last step of a full migration of a VFP application into .NET. That one was a robot application which includes, among other things, the indexation of content with the use of PHDBase. Now that everything is in .NET, I need to avoid all kinds of VFP native stuff. Everything I needed so far, in regards to executing VFP commands, have been converted by the use of ExecScript(). However, the loading of a FLL does not seem to be supported. I have something like this presently:
>>
>>
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SET SAFETY OFF"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SET EXCLUSIVE OFF"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""CLOSE ALL"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""USE " + lcLocalDBF + "Thread IN 0"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SELECT Thread"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SET LIBRARY TO D:\WWW\PHDBASE ADDITIVE"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""PHD('MSGLEVEL NONE')"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""PHD('IXAUTO OFF')"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""USE " + lcLocalDBF + "Thread IN 0"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SELECT Thread"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SEEK " + loRow("Numero").ToString + " ORDER TAG Numero"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SCATTER MEMVAR MEMO"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""USE (" + lcFile + ") IN 0"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""SELECT(" + lcAlias + ")"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""APPEND BLANK"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""GATHER MEMVAR MEMO"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""PHD('IXADD')"")")
>>            loDataProviderStructure.CommandTextAdd("EXECSCRIPT(""USE IN (" + lcAlias + ")"")")
>>
>>
>>There is no error on the SET LIBRARY TO D:\WWW\PHDBASE ADDITIVE line. However, the next line will return an error "File 'phd.prg' does not exist.".
>>
>>So, it is not clear at this point if the loading of the FLL has worked or not. One thing for sure, the application does not return any error on that one. But, the next line need the library to be loaded. As it is complaining, I am assuming the FLL has not been loaded successfully.
>>
>>Has anyone has any advice on this and/or how to be able to benefit of the PHD('IXADD') line from VB.NET?
>
>Michel,
>
>The simple and obvious answer is that you need everything (the whole script) as a one command for execsript (with CRLF between each VFP command), not each command as a separate execscript since each of them is executed in its own environment and has no idea about previous execscript command.
>
>Cetin showed an example here and in MSDN forum how to invoke one long command.
>
>You may check this thread at MSDN http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1771883&SiteID=1 for the sample of executing long text.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform