Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 08 DEC 2000 09:51:46PM Barry Stevens wrote:

I have written a dialog box for a Change password option for users.

I tried to use CREATE_USER with the following code on the 'OK' button CLICK event:

declare subroutine msg, send_event, create_user, post_event

declare function Get_Status

Pass1=.PASS1-]DEFPROP

Pass2=.PASS2-]DEFPROP

if len(Pass1) GE 6 and len(Pass2) LE 20 else

msg(@Window,"Password length is incorrect":@fm:@fm:@fm:"H")
send_event(@Window,"CLEAR")
return 0

end

if Pass1=Pass2 else

msg(@Window,"Passwords entered are different":@fm:@fm:@fm:"H")
send_event(@Window,"CLEAR")
return 0

end

Create_User(@Username, Pass1,@Admin)

if Get_Status(ErrCodes) then

msg(@Window,"System Change password routine returned error code ":ErrCodes:@fm:@fm:@fm:"H")
return 0

end

post_event(@Window,"CLOSE")

RETURN 0

;BUT I get the following error msg when drops to debugger.

SYS1500 Primary Row Locked TABLE CREATE_USER Key 2

Can anyone help, Should I be doing this diffently.


At 09 DEC 2000 06:59AM Oystein Reigem wrote:

Barry,

I found out once that the 4th parameter (overwrite flag) is necessary when you use Create_User programmatically. Even when you create a new user (flag=0). Not just when you change an existing one (flag=1).

And what's that @Admin parameter of yours? You need something with a value of 1 to set admin level.

- Oystein -


At 09 DEC 2000 07:46PM Barry Stevens wrote:

]]And what's that @Admin parameter of yours? You need something with a value of 1 to set admin level.«

@Admin holds the Admin level - I didnt want to change it, but I thought I had better supply it in case if I had null, it might clear or give error.

Thanks for your help

Barry

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/542674e5d4c6ee65852569b0000fba17.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1