Problem In Session State

Hai, I'm Using VS2010 and SQL Server 2005.
I have a problem in Session state;
//View.aspx.cs
// In this page just I store a textbox into a session variable.
protected void btnEdit_Click(object sender, EventArgs e)
        Session["rollno"] = txtRollNo.Text;
            Response.Redirect("Edit.aspx");
//Edit.aspx.cs
//In this page I retrieve the session value which is stored in previous page
       protected void Page_Load(object sender, EventArgs e)
        txtRollNo.Enabled = false;
        if (!IsPostBack)
            txtRollNo.Text = Session["rollno"].ToString();
            getdata();
 public void getdata()
        SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
        con.Open();
        SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
        SqlDataReader dr = cmd.ExecuteReader();
        if (dr.Read())
            txtName.Text = dr.GetString(1).ToString();
            txtAddress.Text = dr.GetString(2).ToString();
            txtMobileNo.Text = dr.GetString(3).ToString();
            txtYesNo.Text = dr.GetString(4).ToString();
From the above code, I got an error when I press Edit button in View.aspx page.
The Error is
Description: An unhandled
exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Web.HttpException: A page can have only one server-side Form
tag.
Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack
trace below.
Help Me.....

Hai,
I'm using VS2010 and SQL Server 2005.
I have a problem in Session state.
See below is my code,
//View.aspx.cs
//Here I assign a textbox value to session
protected void btnEdit_Click(object sender, EventArgs e)
        Session["rollno"] = txtRollNo.Text;
            Response.Redirect("Edit.aspx");
//Edit.aspx.cs
//Here I assign a session value to textbox, which is stored in last page.
protected void Page_Load(object sender, EventArgs e)
        txtRollNo.Enabled = false;
        txtRollNo.Text = Session["rollno"].ToString();
        getdata();
public void getdata()
        SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
        con.Open();
        SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
        SqlDataReader dr = cmd.ExecuteReader();
        if (dr.Read())
            txtName.Text = dr.GetString(1).ToString();
            txtAddress.Text = dr.GetString(2).ToString();
            txtMobileNo.Text = dr.GetString(3).ToString();
            txtYesNo.Text = dr.GetString(4).ToString();
From the above code If I the Edit button, It will show an error like 
       

Similar Messages

  • Problems With Session State Protection

    I have enables SSP on one of my applications and everyting seemed ok until I reached a page with a custom pop up page.
    I use this code in my page header
    {} used to display code
    {<script language="JavaScript1.1" type="text/javascript">
    function callMyPopupRank (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url;
    url = 'f?p=&APP_ID.:115:&APP_SESSION.::::P115_RANK,P115_RANK_ID:' + formVal1;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=400,height=630");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>}
    Then I call it from post element text of an item
    {<img src="#IMAGE_PREFIX#edit-white.gif" border="0" alt="Edit">}
    When my pop up page opens I get this error
    Attempt to save item P115_RANK in session state during show processing.
    Item protection level indicates "Item may be set when accompanied by a "session" checksum.".
    No checksum was passed in or the checksum passed in would be suitable for an
    item with protection level "(No checksum was provided)".
    How do I append the checksum to my url ?
    Thanks
    Gus
    Edited by: Gus C on Jan 8, 2010 1:50 AM
    Edited by: Gus C on Jan 8, 2010 1:52 AM

    You will need to use the APEX_UTIL.PREPARE_URL function to append the checksum to the URL. I would suggest you use a hidden page item to hold the URL and then reference it in your JS.
    I hope that helps
    Shunt

  • Session state protection violation

    I turned on the session state protection on my application, the setting for Application Item, Page Data Entry Item and page display-only item are "checksum-required, application level". I want the URL to be shared by user in different sessions (for example bookmark). when I open two browsers (IE, Firefox) and login as same user, I copied/pasted url from one browser to another and received "Session state protection violation: This may be caused by manual alteration of a URL containing a checksum or by using a link with an incorrect or missing checksum."
    Did I misunderstand the intent usage of this feature? I also noticed that checksum generated by the system remains the same no matter what checksum level I set (application, user, session).
    I am running APEX 3.1.0.00.32.

    Cheng-Lu,
    I didn't forget you, this was a very difficult problem to debug.
    I think I have a workaround for you. I added a page process to your login page named "fix deep link item". This restores the value of FSP_AFTER_LOGIN_URL that gets passed to this login page and is supposed to be immediately saved in session state. Due to a bug, this value was getting truncated to "f" before it could be saved. The new page process looks at the current URL and uses the value there which is still intact and saves that value in session state. I tested it with your applications. Please let me know if this works. We'll make a proper fix in the 3.2 release.
    So this was not a problem with session state protection but in the "f" procedure which parses argument names/argument values in f?p URLs. This gets tripped up when an argument value contains a pattern like &cs= which is first treated as an argument to the orignal "f" call and therefore is never seen as an argument value in the list of arguments.
    I have some other observations about your applications. I see that they have code in the page sentry function attribute of the authentication scheme. The code you have in there is completely unnecessary and could actually make the application less secure. You should leave this attribute empty and let the default (built-in) page sentry do all the work.
    Scott

  • Order Version problem in session

    Following error is getting displayed while udpating the order:
    Saving order 804880053 failed because doing so would result in data being overwritten. Order data for your browser window was out of date. Please re-submit your changes for them to take effect.
    My order is getting update in CSC and after that again I'm updating my order in StoreSite, in that perticular scenario only this error is coming.
    I have also used below code before updating the order in store site:
    itemDesImpl = (ItemDescriptorImpl)rep.getItemDescriptor("order");
    itemDesImpl.removeItemFromCache(orderId);
    and
    oImpl.invalidateOrder();
    but It only removes cache data not session data and I think the problem is due to session data of order. If I would be able to remove order from session also, I guess I'm done with that error.
    As per my understanding below places order data exists:
    1. Session
    2. Cache
    3. Database
    Please help me out!

    Hai,
    I'm using VS2010 and SQL Server 2005.
    I have a problem in Session state.
    See below is my code,
    //View.aspx.cs
    //Here I assign a textbox value to session
    protected void btnEdit_Click(object sender, EventArgs e)
            Session["rollno"] = txtRollNo.Text;
                Response.Redirect("Edit.aspx");
    //Edit.aspx.cs
    //Here I assign a session value to textbox, which is stored in last page.
    protected void Page_Load(object sender, EventArgs e)
            txtRollNo.Enabled = false;
            txtRollNo.Text = Session["rollno"].ToString();
            getdata();
    public void getdata()
            SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
            con.Open();
            SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.Read())
                txtName.Text = dr.GetString(1).ToString();
                txtAddress.Text = dr.GetString(2).ToString();
                txtMobileNo.Text = dr.GetString(3).ToString();
                txtYesNo.Text = dr.GetString(4).ToString();
    From the above code If I the Edit button, It will show an error like 
           

  • Problem with application item and session state

    Okay, let's see if I can explain this problem coherently.
    I have a small app (one page), with an application item, F_WHERE_CLAUSE.
    This page has three regions in which there are items that the users can populate for search conditions. A couple of these items are "select list with submit" (I still need to upgrade to the AJAX method, I know). There is another region which has one hidden field, called P1_WHERE_CLAUSE. This field is defined to "Always, replacing any value in session state..." with source type of "Item (application or page.....", and a source value of F_WHERE_CLAUSE with no default value.
    I have a button called "Search" which submits the page and fires a PL/SQL process which builds a where condition based upon the other page items and stores the value to the application item F_WHERE_CLAUSE (correctly).
    For testing, I've made the P1_WHERE_CLAUSE field visible so that I can see what's going on. I've also clicked the debug and session buttons to help trace this. After I click the "Search" button and the page submits, debug shows:
    0.02: ...Session State: Save "P1_WHERE_CLAUSE" - saving same value: "1=1"
    followed later by:
    0.05: ...Session State: Saved Item "F_WHERE_CLAUSE" New Value="lower(primary_class) = 'rock' and country = 'Spain'"
    The field P1_WHERE_CLAUSE displays with the correct search criteria as signified by F_WHERE_CLAUSE above. However, If I click the "session" button to view the session state values, P1_WHERE_CLAUSE shows up as:
    P1_WHERE_CLAUSE Textarea    1=1    U while F_WHERE_CLAUSE displays the correct value still.
    The reason this "problem" came up, is that this page also has three SQL report regions which use &P1_WHERE_CLAUSE. for the where condition. While they display the correct results on-screen, each report region also has the "Export to csv" enabled, and the export seems to be using the "1=1" condition (from the "session" window) instead of the search criteria that the on-screen region is using (F_WHERE_CLAUSE and the displayed P1_WHERE_CLAUSE), resulting in a retreival of all records.
    Anybody have any idea what's going on and why, and how to get the csv export to use the correct value for the where condition?
    Thanks,
    Bill Ferguson

    It appears the "Export to CSV" functionality requires the item value to be set in session state. The P1_WHERE_CLAUSE item value never gets saved to session state. The page is rendered and the value is put in the item on the page but until you submit the page session state doesn't know what P1_WHERE_CLAUSE is.
    Create a before header computation or process to set the value of P1_WHERE_CLAUSE (which will save it to session state). It is interesting that the report regions didn't need to look at the value in session state but the "export to csv" does.
    --Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Session state and browser cache - Back button problem

    Hi all,
    I have a problem (and unless I'm missing something I think we all do) with session state and use of the browser's Back button. I really hope I'm just being dumb...
    Background scenario:
    Page P has a sidebar list allowing the user to select what content is displayed (e.g. 'stuff relating to X, Y or Z' where X, Y and Z are rows in, say, a table of projects). When a list entry is clicked, we branch to page P with the value of the list item placed in an application-level item (call it G_PROJECT). Reports on page P use G_PROJECT in their WHERE clauses.
    So, click list entry X and G_PROJECT is set to X and page P shows reports for project X.
    Page P also has a set of buttons which branch to various edit pages which allow attributes of page P's current project to be updated. These pages similarly use G_PROJECT in their WHERE clauses.
    Problem scenario:
    1. The user goes to page P and picks project X off the list. Project X's stuff is displayed (G_PROJECT = X).
    2. The user then picks project Y off the list. Project Y's stuff is displayed (G_PROJECT = Y).
    3. The user then clicks the browser's Back button. The page is served from browser cache, so project X's stuff is displayed, but G_PROJECT still = Y.
    4. The user clicks an 'Edit' button; we submit, and branch to an edit page which displays (and will edit) data for project Y because G_PROJECT still = Y.
    This is SERIOUSLY BAD NEWS - apart from being confusing, the user's edit permissions on projects X and Y may differ, and so the user may be able to perform 'illegal' updates.
    I've read what I can on this forum and the rest of the web looking for ways to a) inhibit browsers' 'Back' functions and/or b) prevent pages being cached by the browser, but none of them have worked for me.
    Short of waiting for browser manufacturers to recognise that the web is now full of applications as well as static pages, and enable robust programmatic control of cache behaviour, does anybody know how the problem can be avoided - or at least detected?
    Thanks,
    jd
    Failed attempts to date:
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="cache-control" content="no-store">
    <meta http-equiv="cache-control" content="private">
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate">
    <meta http-equiv="expires" content="Wed, 09 Aug 2000 01:01:01 GMT">
    <meta http-equiv="pragma" content="no-cache">
    Disallowing duplicate submission (page attribute).
    window.history.go(1);

    Thanks Scott,
    I may be being dumb here but I don't see how that would help...
    P250_PROJECT and G_PROJECT are currently kept in sync by app logic. Whichever is used to drive, if the page is rendered from cache then the app logic is not executed, so the rendered page contents are not those keyed by P250_PROJECT, as illustrated in steps 1-4 of the problem above.
    The user sees X, the session items say Y. The engine doesn't know what the user is seeing.
    when page P is POSTed, its hidden item P250_PROJECT should always be used to derive the application item G_PROJECT. Then whether the page was pulled from cache or rendered anew via a click from the sidebar link, the project ID is determined by the contents of that page.
    As I said above I tried this, with the 'Edit' branch set to:
    Set these items: G_PROJECT
    With these values: &P250_PROJECT.
    but it makes no difference. The project ID is not determined by the rendered page contents - the engine gets the value of P250_PROJECT from session state.
    I can code the 'Edit' pages such that they check permissions and if necessary redirect back to p250 (conditional before-header branch), but that's a clunky cure rather than the prevention I was hoping for.
    Please tell me if my understanding is incorrect.
    jd

  • Row fetching, session state, multi-page processing of 1 row - problems

    I'm building an application that's updating a couple of tables via an updateable view and an instead-of trigger. That portion of it works OK, EXCEPT for the problems that I'm having with the APEX end.
    I've got 3 pages; the first page reads the row in via the automated row fetch and has, say columns 1-20.
    Page 2 has, say, columns 20-40 and page 3 has the remainder.
    I have the row fetch set up conditionally so that it only executes the first time that page 1 is displayed. All the columns are set as Database Columns.
    It seems that if I fill in fields on page 1, move to page 2, and back to page 1, the contents of the fields on page 1 are destroyed unless I set their 'Source used' to 'Only when the current value in session state is null'.
    Furthermore, upon update (which is on page 3, via an automated row update), the only columns that get updated are those that exist on page 3. The column values from the other pages no longer exist.
    Does navigation to another page not retain the session-state of database-column items?
    Am I better off just writing my own processes to perform the updates?
    Any other suggestions?
    Frank

    Hello Frank,
    >>I have the row fetch set up conditionally so
    that it only executes the first time that page 1 is
    displayed …
    It seems that if I fill in fields on page 1, moveto page 2, and back to page 1, the contents of the
    fields on page 1 are destroyed unless I set their
    'Source used' to 'Only when the current value in
    session state is null'.
    It seems that the first sentence is not consistent
    with the second one. The only reason the values are
    destroyed, as you call it, is that the ARF is running
    again. What condition are you using on your ARF?
    In any case, the right way to deal with it is to
    change the source used to "Only …", as I understand
    you already did.
    Hi Arie,
    I set an item after the first ARF. I then have the ARF set to execute conditionally based on the presence of that item. (I also display a success message on the ARF, so I know that the ARF is only occurring once). I move to subsequent pages by submitting the current pages.
    >>Does navigation to another page not retain the
    session-state of database-column items?
    Navigating to another page does retain the session state values.
    It's depends on what you mean by navigating.
    Submitting the page set/update session state.
    Redirect without submitting the page will not
    set/update the session state.
    >>Furthermore, upon update (which is on page 3,
    via an automated row update), the only columns that
    get updated are those that exist on page 3. The
    column values from the other pages no longer
    exist.
    Automatic DML is working only with the current page
    items. You can't use it to insert/update other page
    items, even if they are in session state. However, in
    your case, it's not the Automatic DML performing the
    actual updates, but your triggers. Are your triggers
    relying on session state values?
    I think this statement 'Automatic DML is working only with the current page
    items.' answers my question. My trigger is working on session state values. It's an 'instead-of' trigger, so I was letting the automatic DML perform the 'update' on the view, while allowing the trigger to do the actual update of several tables that the view joins by referring to their :NEW. values in the trigger. Since the DML occurs on my last page, those were the only session state values that my trigger ultimately saw.
    >>Am I better off just writing my own processes to
    perform the updates?
    I believe the correct way is to submit the page and
    then branch to the next one. Submitting the page will
    save all your items in session state, and allow these
    items to be available for page 3 DML.
    Regards,
    Arie.I'm doing that already - all the values do appear to be in session sate, except only the items that are on the last page actually make it to the automatic DML update, which seems to agree with your previous statement.
    I suppose I could write my own process to perform the update, as the values are available in session state.
    Thanks,
    Frank

  • Problem since upgrade to 2.0 "Error: Session state protection violation"

    I've upgraded to 2.0. Everything fine except one particular page when I submit it I get "Error: Session state protection violation". I have read up about session state protection, and it is turned off in my application. There are no items, pages or URLs that have any session state protection. There is nothing particularly different about this screen when compared to other screens that work. What can be causing this?
    Steve

    Steve - Thanks for putting that test case out there. This is an odd bug. It happens when you apply the read-only attribute to a "Display as Text (does not save state)" item. Normally, these items are not HTML input items on the page (you see only the value rendered). However, because of a bug, applying the read-only attribute causes an INPUT item to be created. This leads to the problem that you saw -- when an item that should never be POSTed because it is: a) an application item, b) a page item that has the Session State Protection attribute "Restricted - May not be set from browser", or c) a page item of display type "Display as Text (does not save state)", is POSTed, the Session State Protection violation is detected and reported. These checks are performed whether the Session State Protection feature is enabled for the application or not. The reason for that is that checking for cases(a) and (c) is always legitimate and checking for case (b) is always necessary because the Restricted attribute for page items of qualifying display types is always in effect.
    So the workaround in your case is not to use the read-only attribute for the display-only items. They are read-only anyway.
    Thanks again for pointing this out.
    Scott

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Session state value translation issue

    Hello.
    New to APEX and not all that web-savvy. Using version 3.1.2.00.02.
    Little background:
    I have a Select List item, "P1_OPERATOR", working from an LOV of relational operators (=, >, >=, <, <=). I use this item as a string substitute in report queries. This works fine for any reports on the page containing the "P1_OPERATOR" definition itself, "PAGE_1".
    Problem:
    However, when I attempt to set a session state value for a similar item ("P2_OPERATOR") on "PAGE_2" to the value of P1_OPERATOR using the column link of a report on PAGE_1, the value of P1_OPERATOR does not translate correctly for any values involving a right or left angle bracket (it works only for '=').
    Scenario:
    Let's say I'm on PAGE_1 and I select >=. The reports on that page display as expected. When I click on the link to PAGE 2, the reports there display "invalid relational operator". When I view session state from PAGE_2, I can see that...
    P1_OPERATOR is '>='
    P2_OPERATOR is '& gt;=' (space added to get it to display on this post).
    So it's trying to use the html value for >= as a literal value.
    I can also see that APEX has built the URL for the link page as follows...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:%26gt%3B%3D%2C2009-06-27
    If I type in the expected literal URL myself (outside of APEX) as...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:>=,2009-06-27
    ...or even the expected hex URL (outside of APEX) as...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:%5C%3E%3D%5C%2C2009-06-27
    ...PAGE_2 shows the expected results.
    Is there a way to solve this translation problem? Some workaround I haven't thought of?
    Thanks for your help.
    Edited by: user11313762 on Jun 29, 2009 2:30 PM

    Use an PL/SQL process On Load - Before Header with the following:-
    *:P2_OPERATOR := :P1_OPERATOR;*
    You'll have to use a hidden item as your condition (having looked at a page debug, any request value will have expired by the time the process will fire).
    create a hidden item on page 2 called P2_SET_OP
    use Item = value type of condition in your process where exp1 = P2_SET_OP (don't use colon notation here as ITEM has been specified) and exp 2 = Y
    You can even reset P2_SET_OP back to null in the same process as you assighn the operator.
    *:P2_OPERATOR := :P1_OPERATOR;*
    *:P2_SET_OP := NULL;*
    set the value of P2_SET_OP in your link as P2_SET_OP:Y
    Gus..

  • Problem removing session attributes

    I have a problem removing session attributes
    I try w/ mysession.removeAttribute("key");
    but it still lives in memory. I've tried setAttribute("key", null) as the API states that will do the same thing, but it doesn't work.
    I can get mysession.invalidate() to work, but I want to keep some of the attributes there, while removing another.
    I get no exceptions and no errors.
    Help.
    Running Tomcat 4
    jre 1.3.1

    Actually,
    response.addHeader("Expires", "-1");should be enough.
    The browser should then contact the Web server for updates to that page via a conditional If-Modified-Since request. You don't want a cache disabling 'overkill', since you'd still want the page to remain in the disk cache and used in appropriate situations without contacting the remote Web server, such as when the BACK and FORWARD buttons are pressed...
    Anyway, try this first, and if it doesn't solve your problem, add the other cache-disabling headers, as outlined in the previous post.
    If you're using JSP, verify also that your page has
    <%@ page session="true"%>

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • Submitting the value of an item with session state

    Hi,
    I've a Master / Detail Form on different pages, like master report page no.19, master form page no. 20 and detail form page no. 21. I've created this form using Form, master detail form wizard. I've set deptid as a primary key in master, and foreign key in details table. In page 21, i've set the source for deptid, source used : Always, replacing any existing value in session state, source type : Item (application or page item name), source value : P20_DEPTID. While executing the form deptid is showing the value, but, while submitting of the form, it's not saving in the table. What will be the problem??
    Thanks and Regards,
    Sudha.

    Sudha,
    OK.
    Go to the pagedefintion in page 20, click on the wordt report (of your master form).
    You will get a new screen.
    Click on the pencil-icon of your column.
    Again a new screen.
    Select the six tab (it's called LINK).
    Enter item-name and value something like :p21_dept_id and #DEPT_ID#
    where P21_dept_id is the item of the form for the dept_id
    Hope this helps.
    Leo

  • Items not in session state when column link used and prevpage not submitted

    I have a report on page 2 (cemetery lot info) with a column link to page 3 (burial info).
    There is a process on page 3 that updates billing information using items from page 2, and billing code selected on page 3. The problem is, if the user does not submit page 2, session state is null, or has values from previously submitted page 2. How do I make sure the billing info is correctly updated from items displayed on page 2, if they are not in session state?
    begin
    if :P3_BILLING_CODE = 'OWN' then
    :P3_BILLING_NAME := :P2_OWNER1_FIRSTNAME||' '||:P2_OWNER1_LASTNAME;
    :P3_BILLING_ADDRESS1 := :P2_OWNER_ADDRESS1;
    :P3_BILLING_ADDRESS2 := :P2_OWNER_ADDRESS2;
    :P3_BILLING_CITY := :P2_OWNER_CITY;
    :P3_BILLING_STATE := :P2_OWNER_STATE;
    :P3_BILLING_ZIP := :P2_OWNER_ZIP;
    :P3_BILLING_PHONE := :P2_OWNER_PHONE_AC||'-'||:P2_OWNER_PHONE_EX||'-'||:P2_OWNER_PHONE_SC;
    elsif :P3_BILLING_CODE = 'MGR' then
    :P3_BILLING_NAME := :P2_NEW_MANAGER;
    :P3_BILLING_ADDRESS1 := :P2_NEW_MANAGER_STREET;
    :P3_BILLING_ADDRESS2 := null;
    :P3_BILLING_CITY := :P2_NEW_MANAGER_CITY;
    :P3_BILLING_STATE := :P2_NEW_MANAGER_STATE;
    :P3_BILLING_ZIP := :P2_NEW_MANAGER_ZIP;
    :P3_BILLING_PHONE := :P2_MANAGER_PHONE_AC||'-'||:P2_MANAGER_PHONE_EX||'-'||:P2_MANAGER_PHONE_SC;
    elsif :P3_BILLING_CODE = 'FH' then
    :P3_BILLING_NAME := :P3_FUNERAL_HOME1;
    :P3_BILLING_ADDRESS1 := :P3_FUNERAL_HOME_ADDRESS;
    :P3_BILLING_CITY := :P3_FUNERAL_HOME_CITY;
    :P3_BILLING_STATE := :P3_FUNERAL_HOME_STATE;
    :P3_BILLING_ZIP := :P3_FUNERAL_HOME_ZIP;
    :P3_BILLING_PHONE := :P3_FUNERAL_HOME_TELEPHONE;
    end if;
    update cm_burial set billing_name=:P3_BILLING_NAME, billing_address1=:P3_BILLING_ADDRESS1, billing_address2=:P3_BILLING_ADDRESS2, billing_city=:P3_BILLING_CITY, billing_state=:P3_BILLING_STATE, billing_zip=:P3_BILLING_ZIP, billing_phone=:P3_BILLING_PHONE
    where recordid=:P3_RECORDID;
    end;

    Hello,
    If I understand you correctly, it seems like your page logic is a bit problematic. The scenario I see is that the user is populating the form part, submiting the page, and the report region is being displayed (as the where clause depends on an item from the form region). Now, the situation you are describing, where the billing information is not correct, is possible if the user changed some of the form items on page 2, didn't submit the page – hence didn't update the report region – but still chose to branch to the next page, using the (non-updated) report link column. If I understand it correctly, you should first correct this situation. If the user is changing some details in the form section, the page should be re-submitted. This will resolve your problem, because as part of the page submit process, session state will be set correctly.
    I believe this is the simplest and correct solution. Other options, like updating session state per changed item (using JavaScript) will be much more complicated.
    Regards,
    Arie.

  • Application Items/Session State Values and Page Branching

    I have users coming into a specific page in my application, passing in a value on the url that sets the value of an application item, where a validation routine occurs. If their session validates, I want to send them to one page, if it does not, I want to send them to a login error page.
    During validation, I am setting the values of several application items so that these values can be saved and used throughout their session. The values appear to be setting correctly. I am concerned that setting the application items may not be limiting these values to a particular session. So, I have also tried setting the setting session state variables with code like:
    apex_util.set_session_state ('F203_REQ', vReqID);
    I found it curious though when I ran this page, not trying to branch so I could check session state, these values showed up as being application items and I saw nothing under session variables.
    The problem I am having is that once validated I don't know how to branch to these other pages. I have tried adding some javascript in the header to force a page submit so that I could use a branch setup on the page. However, when it comes time to evaluate the branches (it's using one of the application item values I set earlier), I'm getting an error that no branch has been provided. Further research suggests the application item values are being cleared on the page submit.
    So, (1) I either need to know how to preserve those values on submit so the page branch works or (2) I need to branch to the new page without using a page submit and instead doing that in a some code (assuming submit is clearing application item values). I have not been able to find an example of how to do this in code. If there is a way to do this in code, will the application item or session state variable values be retained? I will need these values to be available to the user throughout their session.
    Thanks for the help,
    Steve

    Steve,
    I am concerned that setting the application items may not be limiting these values to a particular session.They are set in the current session only.
    It is hard to know what you are doing exactly without seeing it. If you set up an example on apex.oracle.com we could could address one specific question at at time.
    Scott

Maybe you are looking for