Home » Developer & Programmer » Forms » creating a username and password in oracle forms 6i (oracle forms 6i)
creating a username and password in oracle forms 6i [message #475067] Sun, 12 September 2010 05:55 Go to next message
marylyn
Messages: 3
Registered: September 2010
Location: Zimbabwe
Junior Member
i created a form to create a username and password.i tried creating a user in forms 6i using the following code on the when button pressed trigger:

BEGIN
forms_ddl('create user'||:user_name||'identified by'||:pasword);
commit_form;
END;

i have granted the user to create user but it does not work at all.Please help me find a solution.

pasword and user_name are captured in the form.

Thank you
Re: creating a username and password in oracle forms 6i [message #475068 is a reply to message #475067] Sun, 12 September 2010 07:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
"It does not work" is NOT an Oracle message.
Explain how "it does not work".

Regards
Michel

[Updated on: Sun, 12 September 2010 07:30]

Report message to a moderator

Re: creating a username and password in oracle forms 6i [message #475069 is a reply to message #475067] Sun, 12 September 2010 11:00 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9097
Registered: November 2002
Location: California, USA
Senior Member
If you were to type it in SQL*Plus, there would be spaces between the words:

create user :user_name identified by :password

so, you need to add spaces (after "user", before "identified", after "by") in your concatenated code:

('create user '||:user_name||' identified by '||:pasword)

I don't use forms, but this is what you would do using execute immediate in pl/sql.
Re: creating a username and password in oracle forms 6i [message #475076 is a reply to message #475069] Sun, 12 September 2010 15:46 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Although it won't change anything, in this case COMMIT_FORM is useless. What are you committing?
Re: creating a username and password in oracle forms 6i [message #475111 is a reply to message #475076] Mon, 13 September 2010 01:26 Go to previous messageGo to next message
marylyn
Messages: 3
Registered: September 2010
Location: Zimbabwe
Junior Member
Commit_form was to save the user in a table. It was not showing any error message it was compiling but not creating the user. Thank you for your contributions managed to create the user.
Re: creating a username and password in oracle forms 6i [message #475112 is a reply to message #475111] Mon, 13 September 2010 01:43 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Commit_form was to save the user in a table

What table, if I may ask?
Re: creating a username and password in oracle forms 6i [message #475114 is a reply to message #475112] Mon, 13 September 2010 02:07 Go to previous messageGo to next message
marylyn
Messages: 3
Registered: September 2010
Location: Zimbabwe
Junior Member
I wanted to save all the users that have been created in the form and also to be able to see who created the user
Re: creating a username and password in oracle forms 6i [message #475116 is a reply to message #475114] Mon, 13 September 2010 02:29 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oh, I see. Thank you.
Previous Topic: window hiding in forms 10g
Next Topic: Search Data on basis of date range
Goto Forum:
  


Current Time: Thu Sep 19 13:03:58 CDT 2024