How to verify the user information pass by the form with a stored procedure?

Hi,
I would like to know how to verify user information pass by the form with a stored procedure.
I want make a portal which accepts to new user registration, but I want verify the new user's informations (like the name don't contain a number etc).
Thanks for your help
regards
jla

Hi Samson,
You can use the UI API to do this. You can catch the form_ADD event and then validate the input from the users. You can even block the event from completing (and stop the document from being added) if your code finds some incorrect data using the bubbleEvent functionality.
I don't have one specific example to show you, but if you look at some of the SDK samples (for example C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\02.CatchingEvents) to see how to work with events, you can then create your own validation to ensure the users data is valid.
Regards,
Niall

Similar Messages

  • How to validate input fields as the user is filling up a form with jQuery?

    Hello EA friends.
    Someone has experimented on how to validate input fields as the user is filling up a form with jQuery?, if the field is numeric and insert an A for example, an alert appears showing "insert a number" or not allowed to enter anything until a number is entered.
    Thanks and regards.
    Fer

    Hi Sudeshna.
    Sorry for not responding on time, how can I be included in this code?
    sym.setVariable("typeActivity", "input")
    var Element_1=document.createElement(typeActivity);
    $(Element_1).css({"text-align": "center"});
    //Answer
    sym.setVariable("Answer_1", "4");
    sym.$("box_1").append(Element_1)
    This code is on my creationComplete and it works fine.
    Would greatly appreciate your help.
    Regards.
    Fer García

  • Problem passing OUT parameters form based on stored procedure to another form?

    Hello,
    I am unable to pass parameters of type OUT from a form based on a stored procedure to another form.
    However, I am able to pass parameters of the type IN to the other form.
    This is the code that I have under the heading
    On successful submission of a form, execute this PL/SQL block or PL/SQL procedure:
    declare
    v_partno varchar2(100);
    v_partdesc varchar2(200);
    blk varchar2(10):='DEFAULT';
    v_names varchar2(1000);
    v_values varchar2(1000);
    begin
    v_partno:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_NO');
    v_partdesc:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_DESC');
    v_names := '_moduleid:_show_header:pnumber:pdescription';
    v_values := '1325575336:YES:' || LTRIM(TO_CHAR(v_partno)) || ':' || LTRIM(TO_CHAR(v_partdesc)) ;
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2(v_names),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2(v_values));
    end
    Info:
    1. Passing PART_NO (IN parameter) and PART_DESC (OUT paramter) to another form.
    2. After hitting the submit button, the second form comes up, but with only the PART_NO(type IN) field completed. The PART_DESC(type OUT) field did not get passed to the second form.
    3. The corresponding fields in the second form are pnumber & pdescription.
    4. FYI - I can see all the OUT parameters correctly, if I don't try to pass control to the second form.
    5. Portal 9.0.2 ( the version that ships with IAS 9.0.2)
    Any help would be greatly appreciated. I have been stuck here for a while now!
    Dev

    Re: Error
    Passing OUT parameter to another form.
    You cannot retrieve the value of the OUT parameter from the session object because after executing your procedure,
    the value passed out using the OUT parameter is not loaded in the session object.
    But you can still achieve what you are trying in the following way.
    Let's assume that your procedure has the following str :-
    procedure proc1 (p_in in varchar2,
    p_out out varchar2)
    is
    begin
    /* your processing statements
    end;
    Say, the name of the field, in the 2nd form, where you need to pass the out parameter value is VALUE_FROM_OUT.
    1> Edit the form on procedure proc1
    2> Select the submit button in the left frame and for the PL/SQL button handler choose Submit action.
    3> In the adjacent textarea, comment out the doSubmit statement and use code given below :-
    declare
    l_p_in varchar2(32767);
    l_p_out varchar2(32767);
    l_url varchar2(2000);
    begin
    l_p_in := p_session.get_value_as_varchar2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_P_IN');
    execute immediate
    'begin <schema>.proc1(:b_in,:b_out); end;'
    using in l_p_in, out l_p_out;
    l_url := 'http://<host>:<port>/pls/<dad>/<portal-schema>.wwa_app_module.link?p_arg_name=_moduleid&p_arg_values=<module_id>&p_arg_names=VALUE_FROM_OUT&p_arg_values='||
    <portal-schema>.wwv_standard_util.url_encode(l_p_out);
    <portal-schema>.wwa_app_module.set_target(l_url,'CALL');
    end;
    NOTE :
    ======
    In the code given above, replace
    <schema> with the schema name that owns the procedure proc1
    <host> with webserver host
    <port> with the port of your webserver
    <dad> with the portal dad
    <portal-schema> with the name of the portal-schema
    <module_id> with the module of the 2nd form i.e. where you need to pass the value of the out variable.
    You will have to grant execute privilege on procedure proc1 to your application schema,
    if the procedure proc1 lies in a schema other than the application schema.
    4> Finish editing the form.

  • How to create a table and add columns to it with a stored procedure

    Hi,
    I hope that someone can help me.
    I want to create an empty table with the same columns as another
    table but with 4 columns more.
    So it's actualy a copy of a table but with 4 added columns.
    I have to do it in a stored procedure but I don't know which
    statements I have to use. I need to give 3 parameters : schema,
    table and prefix(e.g. the pers from column pers_number)
    Can someone help me?
    Thanks in advance, Ann

    you can !!
    here is some examples
    DECLARE
    sql_stmt VARCHAR2(200);
    plsql_block VARCHAR2(500);
    emp_id NUMBER(4) := 7566;
    salary NUMBER(7,2);
    dept_id NUMBER(2) := 50;
    dept_name VARCHAR2(14) := 'PERSONNEL';
    location VARCHAR2(13) := 'DALLAS';
    emp_rec emp%ROWTYPE;
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt
    NUMBER)';
    sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';
    EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;
    sql_stmt := 'SELECT * FROM emp WHERE empno = :id';
    EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;
    plsql_block := 'BEGIN emp_pkg.raise_salary(:id, :amt); END;';
    EXECUTE IMMEDIATE plsql_block USING 7788, 500;
    sql_stmt := 'UPDATE emp SET sal = 2000 WHERE empno = :1
    RETURNING sal INTO :2';
    EXECUTE IMMEDIATE sql_stmt USING emp_id RETURNING INTO salary;
    EXECUTE IMMEDIATE 'DELETE FROM dept WHERE deptno = :num'
    USING dept_id;
    EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE TRUE';
    END;

  • How to access internet users information from MacBook shared internet?

    Hi ,
            I want to know about the users information who use the shared internet connection from my MacBook. My MacBook works as WiFi hotspot for different devices, I need to know about their usage from MacBook as statistics or etc ?
    OR
    Please guide me how can I access information of all the devices, how much they are using, when the connect with the hotspot (MacBook shared internet), ?
    Could it possible to access what they are browsing ?
    Your guidance will be appreciated.
    Thanks in advance : !

    Ansar,
    A source group or "group" is what you need to configure on the CSS in order for the backend servers to initiate a connection outbound on the CSS. It would be helpful if you could email me directly a piece of your config. Specifically I would need the "service" section in terms of which servers need outbound access as well as the content rules you have configured and the ACL section to confirm you are not blocking anything.
    As an example.
    If you had
    service pete
    ip address 1.1.1.1
    active
    content pete
    add service pete
    protocol tcp
    port 80
    vip address 2.2.2.2
    active
    group pete_out
    vip address 2.2.2.2
    add service pete
    active
    So what happens is when the service makes an outbound connection, the source ip address is now the vip address. When the return packet comes back, the CSS recognizes it and gets it back to the backend server.
    You can also apply a source group via an acl as another option.
    Regards
    Pete..
    [email protected]

  • How to get the ep user information data in the web dynpro?

    Hi all
      I want to create a web dynpro application on EP.I want to get the ep user information data in the web dynpro.How can I do?Thanks.

    Lin,
    Two steps to achieve this:-
    <b>Step 1:</b> Add the following code in your view Controller:-
    IWDClientUser user = WDClientUser.getCurrentUser();
    IUser objUser = user.getSAPUser();
    wdContext.currentContextElement().setXXXX(objUser.getUniqueName());
    wdContext.currentContextElement().setYYYY(objUser.getFirstName());
    wdContext.currentContextElement().setZZZZ(objUser.getLastName());
    where XXXX, YYYY , ZZZZ are the context names.
    getUniqueName : Gives Login id of Portal user.
    getFirstName : Gives First Name of the Portal user.
    getLastname : Gives Last Name of the Portal user.
    <b>Step 2 : </b>Use "Organize imports" and make sure that you have the following two libraries added in the build path of your project. You can do these by right clicking on your project name ==> Properties ==> Java Build Path ==> Libraries ==> Add External jars.
    The external jars are :
    <b>com.sap.security.api.jar
    com.sap.security.api.perm.jar</b>
    Finally rebuild your project and deploy.
    Regards,
    <b>Chintan Virani.</b>

  • How to Pre-Populate the user information during Assign Task operation

    Hi ,
    I have a requrirement to Pre-Populate the form fields (Name, Email, Phone etc...) when a task is assigned to a user. The users are dynamically assiged, so I am using the Find User and the Assign Task services to locate and assign the task to the user. Since I have a User variable that is a result from the Find User operation, I was hoping to retrieve the user information with the attributes of the User type.
    I tried to use the Set Value service to set the form field (Email) with the email attribute of the User object type i.e.
    /process_data/MyForm/object/data/xdp/datasets/data/Form/User/Email   ->  /process_data/facilityAuthority/object/@email
    However I get the following error when I try to do this - com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: [B@335d of type: [B to type: interface org.w3c.dom.Document.
    Is it possible to retrieve the user information from the User object? If so how do I get the values for the User attributes (Name, Email & Phone etc...) so that I can populate them in the form?
    Thanks,
    Samanthapudi

    Hi Han Dao,
    If you are facing an exception of the form "com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: [B@335d of type: [B to type: interface org.w3c.dom.Document.", It is because the system is trying to cast a Byte Stream into w3c Document and failing. To resolve this we can explicitly cast this byte stream to appropriate data type (String in previous example). To do so we can use a SetValue operation.
    As an example
    Setting
    /process_data/MyForm/object/data/xdp/datasets/data/Form/User/Email   -> /process_data/facilityAuthority/object/@email
    results in the exception
    so we can modify it to
    /process_data/MyForm/object/data/xdp/datasets/data/Form/User/Email   -> string(/process_data/facilityAuthority/object/@email)
    Please let me know if this does not resolve your issue.
    Thanks

  • How to catch an event when the user change values in the project information dialog

    hi,
    i would like to know how to catch an event in my C# code when the user change values in the project information dialog?
    taskChange doesn't catch these changes.
    thanks.
    Thanks, Sharon.

    You need to write save button event handler for project information dialog. Link is having same functionality described. 
    http://blogs.msdn.com/b/husainzgh/archive/2011/08/01/hooking-into-the-project-detail-page-ribbon-save-button-without-overriding-out-of-box-functionality-in-project-web-access-for-project-server-2010.aspx
    http://www.projectserver2010blog.com/2010/01/sharepoint-2010-webpart-client-server.html
    kirtesh

  • Parameters in Url..how do I use login information to insert the primary key

    Uggg, it is 3 am, I am so tired. Please help.
    I have made a registration page for my site. Hurray it works.
    Login Page. It works
    Protected some pages. Works
    Now I am trying to make a page that the users can go to and update their user information. User name, password, email ect.
    I can get it to prepopulate if I put ?id=3, or someother primary key in the url by hand.....and it does update the data.... but I can't, for the life of me, figure out how to make it use the users login information to get and insert the primary key in the url from the link to the update page.
    I have used the hyperlink box and chose the updateaccount.php file, then went to parameters and selected Name: id Value: I chose id from the dropdown from the data base. This puts in an echo that looks like it should work. NO SUCH LUCK.
    Pleeeese!!! What am I doing wrong.
    I am a total novice. Done a few static sites. So please speak slowly.
    Thanks sooooo much

    I really can´t recommend exposing critical stuff like e.g. the user´s login_id in the URL, because once it´s visible, it can be changed by anyone. Better insert the Session Variable kt_login_id, which will only be availabe on a custom PHP page when inserting...
    <?php session_start(); ?>
    ...on line 1 of this document.
    Cheers,
    Günter

  • Displaying the current users information instead of the value of the person who completed the form in the first place.

    I found this fantatic post regarding querying the user profile service 
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx?pi47623=2#comments 
    However i have an issue whenever the form is opened again either to view or edit, it displays the current users information
    instead of the value of the person who completed the form in the first place.
    Please help me, I'm turning more grey each minute

    I think it is how the current user information is stored based on your logic.
    You might be quering current value again when loading the form (Form load Rule).
    you have to tweak your logic, after the user submits the form you can set the username to the one who saved it.
    or in form load, write a logic to see if the form was not saved before and then query the username( by using internal field like "formstatue")
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

  • Login failed. Please verify your login information or contact the sys admin

    Hello
    I've recently installed Oracle EBS 11.5.9 on Red Hat x-86 based linux.
    I'm able to see the EBS login page but i can't login as SYSADMIN / SYSADMIN.
    Infact i can't login @ all.
    Error
    Login failed. Please verify your login information or contact the system administrator

    Hii Fadi
    I plan to remove to EBS from my NAS partition and redo the whole thing cuz i've learned that i missed some steps in terms of OS parameters.
    Just clear my 2 questions.
    1.Teach me how to run rapid wiz from staging.
    The default path in the last installation was /d01/Stage11i/and so on.I added only NAS directory destination path /vision before /d01 and when the install ran it asked me to manually provide source path and didn't run automatically.
    NOW what i plan is
    1.My NAS partition is called /vision. My stage directory named Stage11i is on local HD.I plan to copy my stage directory to NAS drive and run rapidwiz on my NAS from my stage directory and take all directory paths as default and move with the default installation.I believe this way rapidwiz would go automatic and install EBS overnight.No
    Is my approach correct. ??.
    2.My Linux x-86 RH4.0 is a test system running on 10.x.x.x ip network in the bank and it can be reached ( pinged ).However its not allowed to use DNS like the rest of the system.
    In such a situation teach me howto resolve the DNS problem so that my team in the bank is able to access it from remote locations.
    Tell me in terms of exact entries in the host file.
    To me DNS shouldn't matter as long as i can ping the system.Cuz in the last instalation i was able to see the default EBS login page from remote bank site on the same network.
    Secondly do post your blog link or email it to me at [email protected]
    Regards
    Fahad

  • How do I collect user information without using an LMS?

    I have been using Captivate 5 to create training modules that we host on our own site.  The modules are information driven and have no testing included.  Our clients would like us to collect information from the user to track who has viewed the module.  All we need is their name and employee number.  Is there a way to accomplish this without having the user send an email?
    Thanks!

    It sounds like you're publishing your Captivate content as htm/swf output?
    If so and you have access to the services of a web developer, you can use Javascript in the web browser to pass the user information from Captivate out to the browser.  Once in the browser, you can then do anything with the data that your web developer can dream up.
    Jim Leichliter wrote a great series of articles that cover the basics of accessing Captivate variables using JavaScript.   This article in particular talks about passing Captivate variables out to the browser:
    http://captivatedev.com/2011/04/02/captivate-javascript-series-part-3-retrieving-captivate -variables/
    Cheers,
    John

  • How to clear text fields when the user navigates back to the screen

    Hi,
    Does anyone have any idea on how to clear the text input fields and dropdown boxes when the user navigates back to the screen, say for e.g. create screen?
    My issue is that i have plenty of fields in the create screen within a form. Is there a way to avoid programaticaly blanking out every field and just do it at the form level using an api to reset to a state before the user entry?
    Thanks

    This code allows you to make it more generic, and you would need to tweak it if there are more than TextInput controls, but it should provide some ideas.
    As far as using states, you could use SetProperty to set the text to empty, but that might be messier.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.containers.FormItem;
          import mx.controls.TextInput;
          import mx.events.IndexChangedEvent;
          import mx.core.Container;
          private function clearSreen(evt:IndexChangedEvent):void{
            var view:Container = tn.selectedChild as Container;
            for each(var child:Object in view.getChildren()){
              if(child is FormItem){
                var subchild:DisplayObject = child.getChildAt(0);
                if(subchild is TextInput){
                  TextInput(subchild).text = "";
        ]]>
      </mx:Script>
      <mx:TabNavigator id="tn" resizeToContent="true"
        change="clearSreen(event)">
        <mx:Form id="frm1" label="View Number One">
          <mx:FormItem label="First name:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Last name:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
        <mx:Form id="frm2" label="View Number Two">
          <mx:FormItem label="Address1:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Address2:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="City:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="State:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Zip code:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
      </mx:TabNavigator>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • We are sorry, but we are unable to complete your request.•The Office 2007 Product Key provided is already associated with another user on this site. Please log in with the user information originally used with this Office 2007 Product Key.

    Over the years I have had many ISP and email addresses - but now we have  finally gone almost fully virtual...
    I have a live login and MS ID 4 my SkyDrive account but I only use my MS  touch with 8.1, SkyDrive and office 365 for mobility.
    And I still like to backup to my own server!!!
    What would be good is if I can put all the software licenses and product  keys of the software and keep a record of my mac addresses for  hardware  and even static IP's in a file or a secure location within the MS online  store.
    That's where MS wants me to get my computing needs from in future and I  will always be able to retrieve it in future but what about the $$$$$ I have  spent on software, hardware and applications prior to now???
    I know u guys love 2 collect data 4 marketing analysis,
    4 example I have an old PC that is still running a server from last century  - if you knew about it a simple script would allow you to offer upgrades or at  least relevant MS products - UNLIKE the rubbish adds I just turn off or tune out 
    now...
    Why cant I add products previous online email purchases into the 1 MS live  ID account where I can keep it together? If you make that available I don't have  to have separate steam accounts, EA game accounts, ASUS and adobe accounts etc 
    etc.
    What has brought me 2 this is I was looking for my office pro 2007 disks to  rebuild a HOME USE ONLY windows 7 laptop (NO touch screen so 8.1 is no benefit  at all)
    I HAVE 4 Genuine PRODUCT KEYs for Office 2007 BUT EVERY TIME I WENT TO  DOWNLOAD the software - regardless of the key I used - I got the error message:  We are sorry, but we are unable to complete your request.•The Office 2007  Product Key
    provided is already associated with another user on this site.  Please log in with the user information originally used with this Office 2007  Product Key.
    That's crap - This is a clean brand spanker install of Win7 and there was  nothing b4 I put the oem drivers from Toshiba back on.
    I looked at dozens of support pages and forum blogs and tried for hours to  get a copy to download - including incognito and other logins but because my  default PC name is also my MS Windows live ID the same error was repeated.
    I keep away from the non MS sites for these things and with good reason -  there were heaps of similar users with the same issue or very close to it that  had downloaded from a supposed MS copy from eValue or digital river etc and the  next
    thing was total corruption of the OS.
    EVENTUALLY I found a LIVE MS chat on a support site in the US and she gave  me a link to a slightly older version which will need updating and some reg edit  changes but so far, so good.
    The point is - what a crock !
    I should be able to just keep all my software, drivers, updates, service  packs, and versions that I have upgraded in the MS store.
    If Microsoft aren't going to support XP or Office 2003 and eventually 2007,  vista & Windows7 not far behind??? then that's still no excuse for them to  put these restrictions and limits when I OWN my copy of the software!!
    Unlike office 365 and SkyDrive space which is described in the T&C  (that we all read before ticking that radial button to agree of course) as ONLY  under a leased licence.
    IF Microsoft can support AND develop software that supports SQL2000  Servers, why is it so hard to archive and keep the same info for  everyone???

    Over the years I have had many ISP and email addresses - but now we have  finally gone almost fully virtual...
    I have a live login and MS ID 4 my SkyDrive account but I only use my MS  touch with 8.1, SkyDrive and office 365 for mobility.
    And I still like to backup to my own server!!!
    What would be good is if I can put all the software licenses and product  keys of the software and keep a record of my mac addresses for  hardware  and even static IP's in a file or a secure location within the MS online  store.
    That's where MS wants me to get my computing needs from in future and I  will always be able to retrieve it in future but what about the $$$$$ I have  spent on software, hardware and applications prior to now???
    I know u guys love 2 collect data 4 marketing analysis,
    4 example I have an old PC that is still running a server from last century  - if you knew about it a simple script would allow you to offer upgrades or at  least relevant MS products - UNLIKE the rubbish adds I just turn off or tune out 
    now...
    Why cant I add products previous online email purchases into the 1 MS live  ID account where I can keep it together? If you make that available I don't have  to have separate steam accounts, EA game accounts, ASUS and adobe accounts etc 
    etc.
    What has brought me 2 this is I was looking for my office pro 2007 disks to  rebuild a HOME USE ONLY windows 7 laptop (NO touch screen so 8.1 is no benefit  at all)
    I HAVE 4 Genuine PRODUCT KEYs for Office 2007 BUT EVERY TIME I WENT TO  DOWNLOAD the software - regardless of the key I used - I got the error message:  We are sorry, but we are unable to complete your request.•The Office 2007  Product Key
    provided is already associated with another user on this site.  Please log in with the user information originally used with this Office 2007  Product Key.
    That's crap - This is a clean brand spanker install of Win7 and there was  nothing b4 I put the oem drivers from Toshiba back on.
    I looked at dozens of support pages and forum blogs and tried for hours to  get a copy to download - including incognito and other logins but because my  default PC name is also my MS Windows live ID the same error was repeated.
    I keep away from the non MS sites for these things and with good reason -  there were heaps of similar users with the same issue or very close to it that  had downloaded from a supposed MS copy from eValue or digital river etc and the  next
    thing was total corruption of the OS.
    EVENTUALLY I found a LIVE MS chat on a support site in the US and she gave  me a link to a slightly older version which will need updating and some reg edit  changes but so far, so good.
    The point is - what a crock !
    I should be able to just keep all my software, drivers, updates, service  packs, and versions that I have upgraded in the MS store.
    If Microsoft aren't going to support XP or Office 2003 and eventually 2007,  vista & Windows7 not far behind??? then that's still no excuse for them to  put these restrictions and limits when I OWN my copy of the software!!
    Unlike office 365 and SkyDrive space which is described in the T&C  (that we all read before ticking that radial button to agree of course) as ONLY  under a leased licence.
    IF Microsoft can support AND develop software that supports SQL2000  Servers, why is it so hard to archive and keep the same info for  everyone???

  • How to restrict the user(Schema) from deleting the data from a table

    Hi All,
    I have scenario here.
    I want to know how to restrict a user(Schema) from deleting the values from a table created in the same schema.
    Below is the example.
    I have created a table employee in abc schema which has two values.
    EMPLOYEE
    ABC
    XYZ
    In the above scenario the abc user can only fire select query on the EMPLOYEE table.
    SELECT * FROM EMPLOYEE;
    He should not be able to use any other DML commands on that table.
    If he uses then Insufficient privileges error should be thrown.
    Can anyone please help me out on this.

    Hi,
    kumar0828 wrote:
    Hi Frank,
    Thanks for the reply.
    Can you please elaborate on how to add policies for a table for just firing a select DML statement on table.See the SQL Packages and Types manual first. It has examples. You can also search the web for examples. This is sometimes called "Virtual Private Database" or VPD.
    If you have problems, post a specific question here. Include CREATE TABLE and INSERT statements to create a table as it exists before the policies go into effect, the PL/SQL code to create the policies, and additonal DML statements that will be affected by the policies. Show what the table should contain after each of those DML statements.
    Always say which version of Oracle you're using. Confirm that you have Enterprise Edition.
    See the forum FAQ {message:id=9360002}
    The basic idea behind row-level security is that it generates a string that is automatically added to SELECT and/or DML statement WHERE clauses. For example, if user ABC is only allowed to query a table on Sunday, then you might write a function that returns the string
    USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'So whenever any user says
    SELECT  *
    FROM    table_x
    ;what actually runs is:
    SELECT  *
    FROM    table_x
    WHERE   USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'
    ;If you want to prevent any user from deleting rows, then the policy function can return just this string
    0 = 1Then, if somone says
    DELETE  employee
    ;what actually gets run is
    DELETE  employee
    WHERE   0 = 1
    ;No error will be raised, but no rows will be deleted.
    Once again, it would be simpler, more efficient, more robust and easier to maintain if you just created the table in a different schema, and not give DELETE privileges.
    Edited by: Frank Kulash on Nov 2, 2012 10:26 AM
    I just saw the previous response, which makes some additional good points (e.g., a user can always TRUNCATE his own tables). ALso, if user ABC applies a security policy to the table, then user ABC can also remove the policy, so if you really want to prevent user ABC from deleting rows, no matter how hard the user tries, then you need to create the policies in a different schema. If you're creating things in a different schema, then you might as well create the table in a different schema.

Maybe you are looking for

  • Mac will not update flash player, please advise

    My Adobe Flash Player needs to be updated to 15.0.0.189 but the site will not allow me to download. Says 'Your antivirus software must allow you to install software.' I have a Mac OS X 10.7.5. No antivirus software installed. Checked the forums but c

  • ICloud sync using 3G, how to complain?

    Iphone4. When the ios5 comes out, I upgraded. Connecting to university's wifi and charging, my phone was left on desk. The next day I found there was a 365Mb traffic through 3G while charging and my data plan blown. There was some error log at that t

  • ALV - selecting the data based on layout set in selection screen

    Hi, I have an ALV report (Custom). I want to give layout selection at selection screen, so the user can create/select/manage layout at the time of selection screen and only these columns will be displayed in the final output. Instead user execute the

  • Can't install OS X 10.8.2

    Ok. So I open up the AppStore and I'm greeted with the availability of OS X.8.2 and an update to iPhoto. I click "Update All," and AppStore tells me that fails because the updated iPhoto can't be downloaded until I have 10.8.2. Ok, so I click "Update

  • Change position of thumbnails in preview ?

    I'm used to having the thumbnails of a pdf in preview display on the right-hand side of the window. They're now on the left, and it's really throwing me! Does anyone know if there's a setting or a tweak available which will move the preview sidebar b