Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2005
    Posts
    13

    Unanswered: Oracle access question

    Hey guys, I know that you can restrict access in Oracle by using roles and privileges. I was just wondering if there are any other ways in which this can also be done?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Sure. Shut down the database.

    Just kidding!
    To conceal data, there's a possibility of creating a VIEW based on one or more tables (views, etc.). Doing so, you'll show only data you want to and hide underlying database model. Even forms' and reports' developers don't have to know anything about bunch of tables that make this view - as a source, they would choose the view and that's it.

    I guess you'll here more from other forum members.

  3. #3
    Join Date
    Dec 2005
    Posts
    13
    Thanks for your reply, do you know how I could make a view available in a form?

  4. #4
    Join Date
    Jan 2004
    Posts
    492
    Same way you would make a table available in the form. Create it first!
    Oracle OCPI (Certified Practicing Idiot)

  5. #5
    Join Date
    Dec 2005
    Posts
    13
    I have created a view in oracle and have created a form but where to i enter the view as there are places for triggers but i can't find anywhere for a view.

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Hmmm ... it seems you should first learn Oracle Forms Fundamentals. View is just another data block source. The easiest way to include a view into the form is to choose Data Block Wizard. First thing it asks is the source - enter the view name and follow Wizard's questions to build a default data block.

  7. #7
    Join Date
    Dec 2005
    Posts
    13
    Hey littlefoot thanks again for your reply I highly value your advice.
    I am trying my best to learn about forms but im finding it difficult as this is just a hobby. I am making a form for user options so i want to use code like:
    Code:
    if :option = 'x'
    then...
    but after the then in the code how do i add code to deal with a password, and where would i put this code? Thanks

    Thanks.
    Last edited by 1821; 12-11-05 at 19:12.

  8. #8
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'm sorry, but I don't understand what you are trying to do ... could you give some more information about it?
    What "form for user options"? What should it do, and how is it related with a view?
    You'd like to add a password. What would you use it for? Authorization is performed BEFORE entering the form, during the connection process to the database.

  9. #9
    Join Date
    Dec 2005
    Posts
    13
    I was just going to develop a simple form which has options such as

    press I to insert products (password required)

    press Q to query products
    Last edited by 1821; 12-11-05 at 19:44.

  10. #10
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I see ... but, that's not the way one should do it as it is called reinventing the wheel. You should rather create different roles. For example, if your "project" has only one table, you could create two roles: one which can only select data (GRANT SELECT), and another which can also insert (perhaps update and delete?) data (GRANT INSERT).

    Then create a user and grant him role you want. When another user appears, grant him corresponding role. Do the same for every new user and that's it.

    It is possible to code your request, but WHY bother?

  11. #11
    Join Date
    Dec 2005
    Posts
    13
    yeah I know about the roles and granting but this is an exercise that i am just trying to do to and then i will move on to granting and so on. So if you have any advice on the code above like where it should go and also how the password would be handled it would be of great help.

    Thanks again for your advice
    Last edited by 1821; 12-11-05 at 20:08.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •