sgoupil
8th February 2008, 20:17
I'm trying to do this session through function server. When we go (manually) in this session on form 2 (Database User Data), we insert a new record, put the Database User (new database user in my case), wich starts sub session ttdba0201s000 Enter Password on form 2 New Password, put the 2 fields available New Password and Re-enter new password and click OK, goes back to the main session with an encrypted password, then we continue the process.
I do the same steps in my code, but when I do a stpapi.update on the subsession ttdba0201s000, I get the following error "Input cancelled on field pass.wd.old" which is not on the form. Anybody can help? Here is my code.
stpapi.put.field("ttdba0115m000", "ttdba015.db.user", target.user)
stpapi.handle.subproc("ttdba0115m000", "ttdba0201s000", "add")
stpapi.put.field("ttdba0201s000", "pass.wd.1", h.passwd1)
stpapi.put.field("ttdba0201s000", "pass.wd.2", h.passwd2)
stpapi.update("ttdba0201s000", 1, gapi.error.code ) ||||||||| Here is when I get the error message!!!!!
stpapi.save("ttdba0201s000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save password " & gapi.error.code)
endif
stpapi.end.session("ttdba0201s000")
stpapi.put.field("ttdba0115m000", "ttdba015.db.group", h.dbgroup)
stpapi.put.field("ttdba0115m000", "ttdba015.cubb", str$(h.cubb))
stpapi.put.field("ttdba0115m000", "ttdba015.dba", str$(h.dba))
stpapi.update("ttdba0115m000", 1, gapi.error.code )
stpapi.save("ttdba0115m000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save dba password " & gapi.error.code)
endif
stpapi.put.field("ttdba0115m000", "ttdba015.dbse", h.dbse)
stpapi.put.field("ttdba0115m000", "ttdba015.db.user", target.user)
ret = stpapi.find("ttdba0115m000")
if ret = 1 then
ret = stpapi.mark("ttdba0115m000")
stpapi.handle.subproc("ttdba0115m000", "ttdba0200s000", "add")
stpapi.application.option("ttdba0115m000", 1, 1, gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not open session Enter DBA password")
message("The error is: " & gapi.error.code)
else
put.mesg.on.form("Enter DBA Passord", 1)
stpapi.put.field("ttdba0200s000", "dba.name", h.dbaname)
stpapi.put.field("ttdba0200s000", "pass.wd", h.passwd)
stpapi.save("ttdba0200s000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save dba password " & gapi.error.code)
endif
stpapi.end.session("ttdba0200s000")
endif
record.count = record.count + 1
show.bar()
else
message("User " & target.user & " not found for dba conversion")
endif
stpapi.end.session("ttdba0115m000")
I do the same steps in my code, but when I do a stpapi.update on the subsession ttdba0201s000, I get the following error "Input cancelled on field pass.wd.old" which is not on the form. Anybody can help? Here is my code.
stpapi.put.field("ttdba0115m000", "ttdba015.db.user", target.user)
stpapi.handle.subproc("ttdba0115m000", "ttdba0201s000", "add")
stpapi.put.field("ttdba0201s000", "pass.wd.1", h.passwd1)
stpapi.put.field("ttdba0201s000", "pass.wd.2", h.passwd2)
stpapi.update("ttdba0201s000", 1, gapi.error.code ) ||||||||| Here is when I get the error message!!!!!
stpapi.save("ttdba0201s000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save password " & gapi.error.code)
endif
stpapi.end.session("ttdba0201s000")
stpapi.put.field("ttdba0115m000", "ttdba015.db.group", h.dbgroup)
stpapi.put.field("ttdba0115m000", "ttdba015.cubb", str$(h.cubb))
stpapi.put.field("ttdba0115m000", "ttdba015.dba", str$(h.dba))
stpapi.update("ttdba0115m000", 1, gapi.error.code )
stpapi.save("ttdba0115m000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save dba password " & gapi.error.code)
endif
stpapi.put.field("ttdba0115m000", "ttdba015.dbse", h.dbse)
stpapi.put.field("ttdba0115m000", "ttdba015.db.user", target.user)
ret = stpapi.find("ttdba0115m000")
if ret = 1 then
ret = stpapi.mark("ttdba0115m000")
stpapi.handle.subproc("ttdba0115m000", "ttdba0200s000", "add")
stpapi.application.option("ttdba0115m000", 1, 1, gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not open session Enter DBA password")
message("The error is: " & gapi.error.code)
else
put.mesg.on.form("Enter DBA Passord", 1)
stpapi.put.field("ttdba0200s000", "dba.name", h.dbaname)
stpapi.put.field("ttdba0200s000", "pass.wd", h.passwd)
stpapi.save("ttdba0200s000", gapi.error.code)
if not isspace(gapi.error.code) then
message("Could not save dba password " & gapi.error.code)
endif
stpapi.end.session("ttdba0200s000")
endif
record.count = record.count + 1
show.bar()
else
message("User " & target.user & " not found for dba conversion")
endif
stpapi.end.session("ttdba0115m000")