Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters as a variable
Message
General information
Forum:
Visual FoxPro
Category:
Conferences & events
Title:
Passing parameters as a variable
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050509
Message ID:
01050509
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform