Home » Developer & Programmer » Forms » connect DataBAse for Form Level  () 1 Vote
connect DataBAse for Form Level [message #281758] Mon, 19 November 2007 04:25 Go to next message
roni_a180
Messages: 45
Registered: October 2007
Member
hi, i write a following code, i given uasername , password, and string in form level , and this is DataBase user,
when given username,user password is same in the database user and password then menu.fmx form is open others then message display
Message('Error -- not data base user .');
------------------

v_name := :block.username;
v_password := :block.password;
v_string := :block.string;

v_comm:=v_name||'/'||v_password||'@'||v_string;

host(v_comm);


then i write i condition


IF NOT Form_Success THEN

Message('Error -- not data base user .');

ELSE

call_form('menu.fmx');

end if;


ok
thanx
Re: connect DataBAse for Form Level [message #281761 is a reply to message #281758] Mon, 19 November 2007 04:43 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why not just calling the form? User will be prompted to enter his/her credentials anyway.

By the way, what good would HOST command do (the way you've written it)? HOST executes operating system commands. Your command is (just as an example)
C:>\ scott/tiger@xe
It is not a valid operating system command (not only on MS OS's, I believe it wouldn't work anywhere).
Re: connect DataBAse for Form Level [message #281766 is a reply to message #281758] Mon, 19 November 2007 05:00 Go to previous messageGo to next message
roni_a180
Messages: 45
Registered: October 2007
Member
hi

cause first i build a logon screen , and there r 2 input string,
1 is user name , 2 is password.

when the user and password is same the database user name and password then logon screen execute and other forms is open
Re: connect DataBAse for Form Level [message #281768 is a reply to message #281766] Mon, 19 November 2007 05:04 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How do you run that "logon" form? Aren't you already connected to the database?
Re: connect DataBAse for Form Level [message #281769 is a reply to message #281758] Mon, 19 November 2007 05:06 Go to previous messageGo to next message
roni_a180
Messages: 45
Registered: October 2007
Member
yes i connect database

but, for say there r 2 data base user

1 time i connect when the form is build.
then next time i login 2 data base user
Re: connect DataBAse for Form Level [message #281798 is a reply to message #281769] Mon, 19 November 2007 06:15 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
But WHY are you making things complicated? What's wrong with specifying login credentials only once? Do you think your users will be happy with providing username/password twice, just to be able to start working? Where's the purpose in it?
Re: connect DataBAse for Form Level [message #281887 is a reply to message #281758] Mon, 19 November 2007 18:07 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Also, don't use form names like 'menu' or 'form' or 'forms'. Oracle systems just don't like us using THEIR names.

David
Previous Topic: HOW TO GET STORE image file
Next Topic: Vertical Scroll bar
Goto Forum:
  


Current Time: Sun Dec 04 00:38:20 CST 2016

Total time taken to generate the page: 0.10198 seconds