mvDEchoP

subroutine mvDEchoP

***************************************************************************

* mvDEchoP: Echo all fields back to an mvDesigner Server using a persistent

*             connection, then waits to echo the page back again as a

*             non-persistent page.

***************************************************************************

*

include wbp w3Include

values     = ""

formanme   = ""

* list of variables to not manually add

skip     = ""

skip<-1> = "w3Exec"

skip<-1> = "w3ServerPool"

skip<-1> = "w3Debug"

skip<-1> = "w3User"

skip<-1> = "w3UserPass"

skip<-1> = "formname"

skip<-1> = "w3SessionId"

skip<-1> = "w3ProfileId"

skip<-1> = "w3USERPASSWORD"

LoopCounter = 1      ;* number of times the page has been echoed

EQU NumLoops to 2    ;* number of times to repeat loop

for LoopCounter = 1 to NumLoops

    call w3GetValAll(values)

    locate("FORMNAME", values, 1; loc) then

      formname = values<2,loc>

    end else

      formname = "Not Set"

      call w3log("mvDEcho", "No formname set")

    end

    call w3mvDInit(formname, "")

    cnt = dcount(values<1>, @VM)

    for i = 1 to cnt

        locate(values<1, i>, skip; loc) else

           temp = values<2,i>

           convert @svm to @vm in temp

           call w3mvDInsert(values<1, i>, temp, 0)

           CRT "Inserting: ":values<1, i>:"-":temp

        end

    next i

    err = w3_OK

    Options = w3_P

    if LoopCounter = NumLoops then Options = ""   ;* last one

    call w3mvDInput(err, 0, Options)

    if err # w3_OK then

      call w3Log("mvDEchoP", "w3mvDInput returned: ":err)

    end

next LoopCounter

return