Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters as a variable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Conférences & événements
Titre:
Passing parameters as a variable
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01050509
Message ID:
01050509
Vues:
52
I have a com object that accepts an xml document. This XML document has a few elements one of which is the prg to call, and other elements would be the parameters to pass to the prg.

This com object builds a string that will hold the parameters. Each of the prgs main function is called AIMsiMain. This allows me to issue a set procedure command for the prg and then issue AIMsiMain(), like so:
	PROTECTED FUNCTION CallLocalProg(sProgPath, sProgParams) as Variant
		LOCAL lRet, lcCLPExp as Exception

		TRY 
			SET PROCEDURE TO &sProgPath

			IF NOT ISNULL(sProgParams)
				lRet = AIMsiMain(&sProgParams)
			ELSE
				lRet = AIMsiMain()
			ENDIF

			RELEASE PROCEDURE &sProgPath
		CATCH TO lcCLPExp
			lsRet = 'Error: blah, blah' 
			RELEASE lcCLPExp
		ENDTRY
		
		RETURN lRet
	ENDFUNC
One of the parameters will hold data that could contain quotations. Of course this then screws up the parameters being sent.

Is there another way to accompish this?

Thanks
Paul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform