Re: Looking for documentation on how to read a Miva database via Miva Script
Hi Kent: Thanks for your help. The code you commented on was a snippet, I hadn't included the MvOPEN code. I made the change you suggested and it now works when run with the toolkit's callURL.
My task now is to convert this to a MvFUNCTION and execute it with mvt:do from my template. That is proving to be a challenge as I can't even get this simple function "getZone" to execute correctly using this mvt:do:
<MvFUNCTION NAME = "getZone" PARAMETERS = "zoneZIP, zone var" >
<MvASSIGN NAME = "g.zone" VALUE = "{ 'not found' }">
<MvFUNCTIONRETURN VALUE = "xxx">
</MvFUNCTION>
<mvt:assign name="g.zoneZIP" value="028" />
<mvt:assign name="g.zone" value="1" />
<mvt:item name="toolkit" param="sassign|file|zone3.mvc" />
<mvt:do name="g.zone" file="g.file" value="getZone(g.zoneZIP,g.zone)" />
The result in g.zone is null. Passing it by reference, I expected that it would = "xxx" after the mvt:do command was executed.
I've compiled the .mc with the --c5.22 flag and am testing under the mivascript engine 5.22.
Still doesn't work. Waiting for some help from Miva support now.
Cheers, Larry
Hi Kent: Thanks for your help. The code you commented on was a snippet, I hadn't included the MvOPEN code. I made the change you suggested and it now works when run with the toolkit's callURL.
My task now is to convert this to a MvFUNCTION and execute it with mvt:do from my template. That is proving to be a challenge as I can't even get this simple function "getZone" to execute correctly using this mvt:do:
<MvFUNCTION NAME = "getZone" PARAMETERS = "zoneZIP, zone var" >
<MvASSIGN NAME = "g.zone" VALUE = "{ 'not found' }">
<MvFUNCTIONRETURN VALUE = "xxx">
</MvFUNCTION>
<mvt:assign name="g.zoneZIP" value="028" />
<mvt:assign name="g.zone" value="1" />
<mvt:item name="toolkit" param="sassign|file|zone3.mvc" />
<mvt:do name="g.zone" file="g.file" value="getZone(g.zoneZIP,g.zone)" />
The result in g.zone is null. Passing it by reference, I expected that it would = "xxx" after the mvt:do command was executed.
I've compiled the .mc with the --c5.22 flag and am testing under the mivascript engine 5.22.
Still doesn't work. Waiting for some help from Miva support now.
Cheers, Larry
Comment