Set role in a form

Hi,
If I use DBMS_SESSION.SET_ROLE in a form to set a role with password protected, I must put the role password in my form. That what I do not want.
Any idea to prevent this from happen?
Thanks a lot
Stephen

A solution (which we used in the past within a application) is to put the role and password in a database table. The password should be stored encrypted (use e.g. dbms_obfuscation_toolkit to perform the encryption/descryption).
At start up of the form you query the database table and set the role. The logged-in user should of course have select access to the table. The query of the database table can also be done by calling a database (package) procedure in which the query is done.
Hope this will give you an idea how to proceed.

Similar Messages

  • How can I set roles in Forms?

    I have a user granted with diferents roles, is there any posibility when he log on to the application( IN FORMS) to force him to choose with which role he would wants to work and start the application as if he had been granted only with this role?

    FORMS_DDL('SET ROLE MY_ROLE [IDENTIFIED BY PWD]');
    enables the given role and disables all others.

  • How to set roles from JDBC connections

    Hi guys,
    I have a jdbc connection which purpose is to run queries based on a string that I construct in my program.
    My question is: if I have to run a DCL, like: SET ROLE RL_XXX TO USER1;
    What's the easiest way to do it with my same connection?
    Thanks.

    Hi Marc,
    Sorry for the typo. It's a BDC source, I use a WCF client to access a SQL Database (HR External System) that has 4 fields that are necessary to present in the Sharepoint User Profile. The issue occurs with a Full or a Delta Sync. The problem is that if the
    BDC source is not present the fields are deleted (I get a SPS-Dummy Added and all of the pbjects in the BDC Connector Space are deleted).
    I do not want this to happen. I do not want the User Profile Attributes/Fields to be empty/deleted if there is no connection I simply want them to stay what they are... I have two issues.
    1) Is that the even if i change my data on SQL Server side, the changes do not get picked up by the sync. Since the only field that is being tested for change is an ADid, since the id does not change the BDC does not consider them changes.
    2) If there is no connection I do not want the attributes to be deleted. I have not figured out a way to effectively do this.
    So my issue appears to be simple to solve, but after 4 days and hundreds of tutorial pages read I have yet to figure out a proper way to do this.
    Here is the pseudo-specification
    The Fields that come form the HR System (SQL Server) are to be presented in the user profile. If there is no connection to the BDC file the fields remain as they are until there is a connection and updates can be made. Changes to any of the fields are performed
    manually in the HR system. These changes must be picked up by the daily sync.

  • I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be fund raising, gift p

    I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be dependent on the customer type selection from the first list. Some examples would be: fund raising, gift planning, surveys, and others. The purpose of the trip would be dependent on the program type selected from the second list. Some examples of trip purposes would be: presentation, design, prospecting. Further, the purpose of trip selection from the third drop-down box would then have to determine the values of other fields by expense type: such as commission, airfare, hotel. etc. I've tried pop-up menu but can't figure out how to "select" from the final popup list and have it populate a field for the purpose of the trip. I've tried to look at the JavaScript examples for dependent drop-down boxes, but can't find any that quite fit what I'm trying to accomplish. I am very new to all of this. No training in writing Javascripts - just trying to wing it. The form has to be very simple for our consultants to use, but also give our office the detail we need to process through the correct account numbers. I would appreciate any detailed step-by-step instructions - kind of a javascript for dummies type of info. HELP!

    An AcroForm is the name given to the type of PDF form that you create in Acrobat. An XFA form is the type of form that you create in LiveCycle Designer. Although they are both PDF files, they are very different structurally and have significant;y different scripting models. So pay attention to the information on AcroForms and ignore anything about XFA. Be sure to get the sample PDF forms so you can look at how it works and where the scripts are placed.
    What you want to do will require scripting, and if you don't have the experience and are unable to use the information in the tutorials to create what you want, you might consider getting someone who has experience do this for you. I'll often suggest code if I can do so quickly, but what you want requires more than a few minutes.

  • Can I set up a pro forma for multiple images

    Hi all
    Well I am a newbie to Keynote and I am really enjoying using it.
    I am trying to set up a pro forma for class photos at a school, the photos have been handed to me by the teachers but are all slightly different sizes.
    My question is can I set up some sort of master document where I can place the photos (head shots) of the students with their names under them ready for a keynote display and have the photos all the same size without editing them separately.
    I need to be able to remove photos occasionally too (ie if they are absent etc) so would need it to be a 'changeable' master rather than a screen shot.  The amount of students in each class varies from 15 to 29 so I would need to accommodate the 29 with names under them and a heading somewhere on the page.
    Is it doable?  Do I do it straight into the keynote or onto a pages document first?
    Thanks in advance for any help advice you can give.
    Regards
    Alitheste

    The Mac OS X Mail application has a "Junk" function that works locally, on the Mac, and just puts emails from previously designated "junk" addresses into a separete folder, so you don't have to wade thru all that spam in your Inbox. It's a very elegant and simple, local solution, that I dearly miss on iOS.
    I did submit a request for it at Apple Feedback page.
    http://www.apple.com/feedback/

  • How do I set up a .pdf form to save filled data without having to print the form?

    How do I set up a .pdf form to save filled data without having to print the form?  I have provided my clients a lifecycle .pdf form they can use to record data for unique client meetings.  They want the ability to save their completed data whenever they use the form under a unique file name.  I've told them the only way I know how to do this is to print the completed form as a .pdf document and then save it. 
    Is their a way to save the data to a unique file name without printing the filled form?
    Is there a way to reset the form with blank fields after saving? or to add a clear fields button?
    Thanks.

    If you reader extend  a pdf using livecycle reader extensions then you can save the filled in data - this is true if you are using Adobe reader to view the PDF's. If you open it in Acrobat then the functionality is already there.

  • Setting default value for form field assoc with a table column

    On a "Create Record" situation I was trying to set the default values of some form fields using a page level "Process". These form fields have Source Type = Database Column. It wasn't working, I could only set non-db assoc form field values no matter when the "Process" was set to exec. From some other posts it seems that this is by design, ie. not being able to programatically set the initial values of form fields that are sourced to db columns. I was hoping to have just one "Process" that would exec to set these initial values in one place rather than scattered about for each field that needed a default value. These particular default values come from ref tables and may be different for each user.
    So, it looks like I have to use a "Default Value" plsql chunk for each field on the form itself or else set their value on the calling form's Redirect in the "Set these Items" area.
    Is this correct?

    You could define a database function which accepts the name of the item and the user ID of the user running the application. Based on the item name and the user ID have the function return the appropriate initial value. Invoke this function in a "Default Value" PL/SQL block.
    Does that help in centralizing your initial values? You could have one function per page or one function per application. I would do one function per application.

  • Using SET COUNTRY in SMART forms

    Hi All,
    We have used SET COUNTRY 'GB' in the smart forms initialization code editor.
    But it is not reflecting currency formats & date formats in the country specific formats.
    I have to change the setting only in smart forms code only as i will not be able to edit print program.
    can any body solve this issue!
    Any system setting we need to do!
    Thanks in advance.
    Thanks,
    Deep.

    hi..
    U can change the settings in SU01.
    give ur username.
    Change in DEFAULTS tab, in Decimal Notation field.
    regards,
    Padma

  • How to use the Oracle's SET ROLE?

    Hi all,
    does anyone know how I can call SET ROLE (for Oracle) from java before the report is produced with
    Crystal Reports API?
    I'm using Crystal Reports 2008 for the report design and new crystal report java sdk of JRC (v12.2 with SP1) which know as CRJ in my J2EE application.
    I tried to insert a Command (SET ROLE role) into a working fine report.
    The report runned into Crystal Reports 2008 works fine.
    Since has been made a high number of reports without a SET ROLE, to avoid to modify all the reports already made, I tried to run the SET ROLE from JAVA adding a CommandTable to report.
    Below the code inserted into java class:
              ConnectionInfos connInfos = new ConnectionInfos();
              IConnectionInfo iConnInfo = new ConnectionInfo();
              PropertyBag propertyBag = new PropertyBag();
              try {
              String usernameOracle = GestoreContesto.getAttributo("usernameOracleReport");
              String passwordOracle = GestoreContesto.getAttributo("passwordOracleReport");
              String connectString = GestoreContesto.getAttributo("dbUrl");
              String driverName = "oracle.jdbc.OracleDriver";
              //String driverName = "oracle.jdbc.OracleConnectionCacheImpl";
              //String JNDIName = "jdbc/nsisrdatasource";
              String userName = usernameOracle;               
              String password = passwordOracle;
              String TRUSTED_CONNECTION = "false";
              String SERVER_TYPE = "JDBC (JNDI)";
              String USE_JDBC = "true";
              String DATABASE_DLL = "crdb_jdbc.dll";
              //String JNDI_OPTIONAL_NAME = JNDIName;
              String CONNECTION_URL = connectString;
              String DATABASE_CLASS_NAME = driverName;
              propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
              propertyBag.put("Server Type", SERVER_TYPE);
              propertyBag.put("Use JDBC", USE_JDBC);
              propertyBag.put("Database DLL",DATABASE_DLL );
              //propertyBag.put("JNDIOptionalName",JNDI_OPTIONAL_NAME );
              propertyBag.put("Connection URL", CONNECTION_URL);
              propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
              iConnInfo.setAttributes(propertyBag);
              iConnInfo.setUserName(userName);
              iConnInfo.setPassword(password);
              connInfos.add(iConnInfo);
              String TableName = "Custom_Query";
              String TableAlias= "Custom_Query";
              CommandTable table = new CommandTable ();
              table.setAlias (TableAlias);
              table.setName (TableName);
              table.setConnectionInfo(iConnInfo);
              table.setCommandText("SET ROLE role");
              databaseController.addTable(table, null);
              catch (ReportSDKException e) {
                   System.out.println("......");
    When I tries to render a report from Java I received this ERROR:
    15:32:52,935 INFO  [STDOUT] 15:32:52,935 FATAL [JRCCommunicationAdapter] Request failed and JRC Command failed to be undone
    15:32:52,966 INFO  [STDOUT] 15:32:52,951 ERROR [JRCCommunicationAdapter]  detected an exception: Nessun risultato restituito dalla query.
         at com.crystaldecisions.reports.queryengine.Table.u7(Unknown Source)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(Unknown Source)
         at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
         at com.crystaldecisions.reports.common.Document.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.f.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.an.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.b0.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.b0.b(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.bb.int(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.addTable(Unknown Source)
         at it.ServletHelper.querySetRole(ServletHelper.java:627)
    It's a big problem. If anyone has any idea, I'd greatly appreciate it.
    Thanks

    Hi all,
    running a report with two command from java (the first contains a simple "SEt ROLE role",
    the second contains a simple select) is raised the error "No results returned by the query" while in
    Crystal Reports 2008's preview the report works fine.
    Therefore I ask: "Is it possible to run a report that contains a query without result from Java?
    How can do with the SET ROLE command, which is essential for me?"
    Thanks

  • Set role does not appear to be working

    Below, I've listed two blocks of code. The first block executes just fine. The second block throws an exception on the last line. The error returned from the server is "ORA-04043: object PERSON_VIEW does not exist". The only difference between the two blocks of code is how they log in. The first block logs in as a user with more rights. The second block logs in as a user with very little rights, but obtains more rights using the "set role" statement. I used SQL Plus to log in manually as the second user, executed the "set role" statement, and had no problem describing PERSON_VIEW. What am I doing wrong in the second block of code?
    Environment *pEnv = Environment::createEnvironment( Environment::OBJECT);
    Connection *pCon = pEnv->createConnection( "MYAPP", "PASSWORD", "MYDB");
    MetaData data = pCon->getMetaData( "PERSON_VIEW", MetaData::PTYPE_VIEW);
    Environment *pEnv = Environment::createEnvironment( Environment::OBJECT);
    Connection *pCon = pEnv->createConnection( "USER", "PASSWORD", "MYDB");
    Statement *pStatement = pCon->createStatement( "set role MYAPP_ROLE identified by PASSWORD");
    pStatement->executeUpdate();
    MetaData data = pCon->getMetaData( "PERSON_VIEW", MetaData::PTYPE_VIEW);

    In case anyone cares, the actual problem is that the OCCI throws an Ora-4043 when describing a SYNONYM in 10.1.0.3. This has been designated a bug and assigned to the development team. :o)

  • Setting breaks in tabular forms

    Has anyone had any luck with setting breaks in tabular forms. It seems so straight forward, yet it does not work for me.
    I have a report with the first column called tail_number followed by many other fields.
    I set the break formatting to
    Breaks = First Column
    Display the text on report breaks... = Total: #SUM_COLUMN_HEADER#
    For Repeat Heading Breaks: <b>Details for Tail: #COLUMN_VALUE#<b/>
    This all came straight from the book Pro Oracle Application Express.
    Any ideas?
    Sandra

    Hi Sandra,
    I created a report against 'select tailnumber, serialnumber, itemnumber from aircraftitems'
    I am showing all columns and have a sum on itemnumber.
    Using theme Red and region template Reports Region (maybe some templates are temperamental on this)
    In Break Formatting...
    Display this text when printing report sums = null
    Breaks = First Column
    Display this text on report breaks...= Total: #SUM_COLUMN_HEADER#
    When displaying a break row...= null
    When displaying a break column...=null
    When displaying a break row...= null
    Identify how you would like your breaks = Repeat Headings on Break
    For repeat headings breaks use...= Details for Tail: #COLUMN_VALUE#
    And this worked as expected for the break and summary row.
    Break Test     
    Details for Tail: N148FJ
    AIRCRAFTSERIALNUMBER     ITEMNUMBER
    074     9
    074     5
    074     2
    074     3
    074     4
    074     5
    Total: TAILNUMBER     28

  • How to set special payment advise form for payment advise.

    Hello,
    i would like to set special sap script form payment advise for particular payment method (not only for company code) but print program calls every time only one payment advise form from tcode OBZ1  - table T042B (not from OBZ4 - table T042E).
    Can be payment advise form dependent on payment method?
    Is it possible at all.
    thanks

    OK

  • How to set role which can issue only one command

    I am thinking about setting role, which will be allowed to issue olny one command. I have created role test. Which has the following entries in the following files:
    /etc/user_attr
    test::::profiles=OneCommand;type=role
    /etc/security/exec_attr
    OneCommand:solaris:cmd:::/tmp/data.sh:euid=0
    After this I sill could issue all comands, not only test command /tmp/data.sh.
    When I issued comand profiles on test role I received the following:
    bash-3.00$ profiles test
    OneCommand
    Basic Solaris User
    All
    So I commented line in the /etc/policy.conf to read:
    #PROFS_GRANTED=Basic Solaris User
    After that, when I try to issue /tmp/data.sh command as a test role I receive the following error:
    $ /tmp/data.sh
    pfexec: Exec format error
    Does anybody know how to set up the role which can issue only one command ? Maybe there is a way to do this in the way which wil not affect another roles (ie, not to touch /etc/policy.conf).
    Best regards

    RadekW wrote:
    I am thinking about setting role, which will be allowed to issue olny one command. I have created role test. Which has the following entries in the following files:They will need the ability to run at least a profile shell otherwise all bets are off. So now you're down to two commands. :-)
    bash-3.00$ profiles test
    OneCommand
    Basic Solaris User
    AllFirst you need to define what already exists by default. (policy.conf)
    Then you get to change those defaults or create a new default list just for test.
    Then you get to add a role or profile for test that allows the execution of a profile shell and one command.
    Then you should test all of the user accounts to ensure that something didn't break. This step might be a little overkill.
    alan

  • How to set connection between oracle forms and DB?

    I have installed win xp,
    oracle database 10g in c drive ,
    oracle forms and reports 10g in d drive ,
    how do i set the connection between forms and DB ?
    i know its an old question but i am very new to this !
    thanks in advance.

    You didn't mention the versions or whether you are using Developer Suite or Application Server. I guess it really doesn't matter in this case, but please provide complete information in the future.
    In order to connect the F/R home to a db you will need to make the appropriate configuration entries in tnsnames.ora found in the F/R home (\NETWORK\ADMIN). The entry you add will be similar to the one found in the tnsnames.ora for the db which is found in a similar directory in the db home. The entry will look something like this:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myMachine)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = myMachine)
      )

  • Can I run Alter Session set sql_trace = True in Forms.

    Can I run Alter Session set sql_trace = True in Forms.

    You could use 'statistics=YES' from command line. If you are using an icon from windows' desktop, then go to properties of that icon and append 'statistics=YES' at the end of TARGET. This basically issues 'ALTER SESSION SET SQL_TRACE TRUE' for the current session.
    Can I run Alter Session set sql_trace = True in Forms.

Maybe you are looking for