Welcome! Log In Create A New Profile

Advanced

a2 q7 - request user to logon

Posted by migamildien 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
a2 q7 - request user to logon
June 23, 2009 10:32PM
i cant seem to find how to request a user to logon. i tried using a substitution variable for the password but this doesnt work. my substitution variable works fine for the the sales_person_id, but not for the password. i also cant locate this in the textbook. did i miss something?
avatar Re: a2 q7 - request user to logon
June 23, 2009 11:17PM
try the logon command without specifying a username and password. I think.

Cobus Neethling
Re: a2 q7 - request user to logon
June 24, 2009 06:42PM
doesnt seem to work



SQL> begin
2 conn;
3 end;
4 /
conn;
*
ERROR at line 2:
ORA-06550: line 2, column 3:
PLS-00201: identifier 'CONN' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
avatar Re: a2 q7 - request user to logon
June 25, 2009 08:27PM
Try with a username but no password (also no slash)

Cobus Neethling
avatar Re: a2 q7 - request user to logon
June 27, 2009 06:26PM
The way I see this question, is that we must ASK the user to log on as Demo/student.

So all that I did was use an IF statement to check if the user is DEMO/STUDENT and if not, asks then to log in as demo/student.

I hope this is the right way..grinning smiley
Re: a2 q7 - request user to logon
June 28, 2009 11:27AM
In the textbook, page 266 - but i the question don't specify error handling - so i don't think we have to include an exception / error message.
Re: a2 q7 - request user to logon
June 30, 2009 10:51PM
simon, i checked out pg 266. this is prob what the question wanted ja. the question couldve been phrased differently though - my understanding is that the user must be logged into oracle. what is described on pg 266, the oracle user isnt changed. but anyway i submitted my assignment already so i cant change it now.
Re: a2 q7 - request user to logon
July 01, 2009 02:06PM
Probably a bit late now but after hours of trying it different ways I eventually realised my mistake. Every time I would load the .sql file and use 'R' or '/' to run it. This works fine for the PL/SQL code but not for the "CONN user_name" instruction. The answer is as simple as running your program with the @ command. For example @Q7A.SQL. Also the CONNECT command should not be used as part of the PL/SQL code.
avatar Re: a2 q7 - request user to logon
July 01, 2009 03:18PM
I did it as it was set out in the hint given with the question.
Sorry, only registered users may post in this forum.

Click here to login