Home » Developer & Programmer » Forms » Current user(database items) (merged 2) (10g)
Current user(database items) (merged 2) [message #540908] Thu, 26 January 2012 09:32 Go to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
Hello guys, I need help regarding database items. I have 2 forms one is LOGIN Form and the other one is MAIN FORM. On the login form, i have 2 text items namely: username and password. and when i click the login button, it should go directly to the main form. ON the main form i have a textbox. That textbox should display the user i entered on my username text item back in login form. I'm a VB.net programmer and I find it a lot complicated to program in PL/SQL.

desperate for help,
Re: Current user(database items) [message #540909 is a reply to message #540908] Thu, 26 January 2012 09:34 Go to previous messageGo to next message
cookiemonster
Messages: 10960
Registered: September 2008
Location: Rainy Manchester
Senior Member
Assuming the username is an actual oracle user then it can be obtained at any point with the user function.
<datablock item> := user;

Re: Current user(database items) [message #540925 is a reply to message #540909] Thu, 26 January 2012 10:16 Go to previous messageGo to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
is that user the database user?
Re: Current user(database items) [message #540927 is a reply to message #540925] Thu, 26 January 2012 10:21 Go to previous messageGo to next message
cookiemonster
Messages: 10960
Registered: September 2008
Location: Rainy Manchester
Senior Member
That's what I said.
Re: Current user(database items) [message #540929 is a reply to message #540927] Thu, 26 January 2012 10:34 Go to previous messageGo to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
But I want to display the user found in my tables. Say for example this is the structure of my tblUsers user_id, username, password.
I have jonalyn as my username. and when i input my username in the username text item, it should display in my main form text item.

In VB.Net this is how i did it:
Me.TxtUsername.Text = Login.TxtUsername.Text

[Updated on: Thu, 26 January 2012 10:35]

Report message to a moderator

Re: Current user(database items) [message #540935 is a reply to message #540929] Thu, 26 January 2012 10:45 Go to previous messageGo to next message
cookiemonster
Messages: 10960
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then you probably will have to pass the username as a parameter between forms.
Or create a global variable to hold it.
Re: Current user(database items) [message #540938 is a reply to message #540935] Thu, 26 January 2012 10:55 Go to previous messageGo to next message
baliberde
Messages: 201
Registered: January 2012
Location: outer space
Senior Member
So how can I do that?
Re: Current user(database items) [message #540939 is a reply to message #540938] Thu, 26 January 2012 10:58 Go to previous message
cookiemonster
Messages: 10960
Registered: September 2008
Location: Rainy Manchester
Senior Member
Read up on both parameters and global variables in form builder help. It has all the details with examples.
Previous Topic: Hierarchical Tree
Next Topic: SENDING EMPLOYEE PAYROLL SLIP
Goto Forum:
  


Current Time: Wed Sep 17 08:41:26 CDT 2014

Total time taken to generate the page: 0.07004 seconds