Problem in transfer statement.

Hi folks,
I want to place the file in the application server using open dataset.
My final output internal table gt_output fields are
               value, kndnr, perio, skunumber,perio.
i used the statement like
data: gv_string(120) type c.
gv_string = p_file.
   open dataset p_file for output in text mode encoding default.
         loop at gt_output into wa_output.
           transfer gv_string to p_file.
            endloop.
In the final internal table, the amount field is the currency data type.
If i executed this one i got the problem is wa_output-amount must be a char type data object(C, N, D or String).
Can u plz give me the suggestion ASAP.
regards
Nag

Hi Hemam,
I faced similar kind of problem long time back. the solution is quiet simple.
the currency field can be formatted  by.
write wa_output-amount to gv_amount currency 'AUS' ROUND 3 DECIMALS 1.
Regards,

Similar Messages

  • Problem saving "space" in ABAP TRANSFER statement

    Hello all,
          I have an internal table that I loop through and write that data to a file using TRANSFER statement. Here is an exmaple of my code:
    data: l_xml_out type string.
    BEGIN OF itab_out OCCURS 0,
                record(some length) TYPE c,
             END OF itab_out,
    Here is an example Itab_out data
    RECORD1:
    " Bon Appetit "
    RECORD2:
    "Managment Co"
    LOOP AT itab_out
                  INTO l_xml_out.
            TRANSFER l_xml_out TO "somefile".
          ENDLOOP.
    When I transfer to file record1 is appended to record2 which i sfine but I am losing space for example I want "Bon Apetite Management Co" but I get "Bon ApetiteManagementCo"! (Space is gone). How do I preserve the space? I did reserach on SDN but could not get my problem resolved. Please provice any feedback if you can.
    Thanks.
    Mithun

    >
    Mithun Dha wrote:
    > Sorry, I might not have provided you all information. I know concatenate but my internaltable has like 20000 records and we are looping through those records into "string" type data variable and transferring to file. The internal table records I gave in my posting was just an example. Thanks for your quick feedback.
    >
    > Mithun.
    So, Can't you concatenate to string type? Yes, you have to concatenate before transfer for 20000 records.
    data: l_text(20) type c,
          l_text1(20) type c,
          l_string type string.
    l_text = 'This is text'.
    l_text1 = 'This is text1'.
    CONCATENATE l_text l_text1 into l_string SEPARATED BY space.
    write the concatenate within the loop and then transfer the string to data set.
    Edited by: Sampath Kumar on Nov 10, 2009 8:04 AM

  • Transfer State from one WAD to another

    Hello friends.
    I have a trouble using the command TRANSFER STATE in BW 7.0
    I need to trasfer the navigation state of one dropdown box from wad 1 to wad 2.  I already do that, but the problem is that when the second wad is open, the dataproviders that exists in wad are not being filtered by the characteristic of the dropdown box.
    I'm using a variable in the dropdown box. I'm using the same variable in both wads (and in both dropdown boxes) but the dataproviders of wad 2 ar not being filtered when I trasnfer the status.
    How can I get the dataproviders filtered with the value of the dropdown box when transfer state ????
    Thanks in advance.

    Hi,
    the command TRANSFER_STATE will copy the items / data providers  with the same logical to the target web template (if you have choosen to transfer them in the command settings). Meaning, that if you have a data Provider DP_1 in both Web Templates, DP_1 in the target Web Template will have exactly the same state (and therfore also the filter values, as well as the drill down, ... are the same)
    So in fact in your case TRANSFER_STATE should be done (if this is really the correct scenario) for the Data Provider and not for the item, as the Dropdown will always reflect the state of the underlying data provider.
    What you want to achieve sounds more like a RRI (jump to another Web Template while transfering all the filter values, variables, ...)
    Heike

  • Replace B2BUA with a new one, without loosing transfer states

    I'm having some issues with replacing my B2BUA for transfer purpose.
    I have a link between 2 participant by using a B2BUA. I want to transfer one of these participants into another B2BUA, and that new B2BUA will repaces the previous one. I can accomplish this succesfully without any troubles, by using self-transfer and B2BUA
    utilitize.
    But when the link is established in B2BUA between two participants, when creating a new B2BUA, the participants can still talk untill the new B2BUA is established (this is the issue).
    I doesn't loose the link of participant in Call leg 1, since I'm using a Self-transfer leaving the call state as incoming. But if I call BeginTerminate() of the 1st B2BUA while establishing the 2nd B2BUA, then I'll loose my transfer states of the first Call,
    and I'm using this event state to tell me when a transfer is succesfully done.
    How can I cancel the stream between the two participants in the first B2BUA, as soon as I begin to establish the second B2BUA??

    If either leg of the B2B is terminated, the B2B call is terminated. In a transfer scenario the leg of the participating in the self transfer will end before the transfer itself is completed, leading to an OperationFailureException on the EndTransfer. 
    There is really no way to avoid this, so you should just expect it.
    Here is a snip from one of my test programs:
    private void InitiateSelfTransfer()
    Console.WriteLine("Initiating self-transfer on p2p call...");
    //Copy inCall since we will replace it with the new inCall prior to the completion of the transfer.
    AudioVideoCall p2pOldInCall = (AudioVideoCall)inCall;
    //Pass a reference to this instance in the Context so the new inbound call can reattach to this session.
    p2pOldInCall.ApplicationContext = this;
    p2pOldInCall.TransferStateChanged += new EventHandler<TransferStateChangedEventArgs>(oldInCall_TransferStateChanged);
    CallTransferOptions cto = new CallTransferOptions(CallTransferType.Attended);
    //Execute the transfer.
    Console.WriteLine("Beginning Self-Transfer...");
    try
    p2pOldInCall.BeginTransfer(p2pOldInCall, cto,
    ar =>
    Console.WriteLine("Self-Transfer Completed...");
    try
    p2pOldInCall.EndTransfer(ar);
    Console.WriteLine("Self-Transfer was successful!");
    SendTransferNotification(200, "Succeeded at self-transfer");
    //In this scenario the BackToBackCall seems to always terminate the call before we are made aware the transfer is complete.
    //This operation has to execute as Attended, so we simply catch the exception generated, it doesn't seem to cause us any problems.
    catch (OperationFailureException)
    Console.WriteLine("Exception ignored on self-transfer...");
    SendTransferNotification(487, "Call already terminated...");
    catch (RealTimeException ex)
    SendTransferNotification(503, "Failed on self-transfer of inbound leg");
    Console.WriteLine(ex);
    , null);
    catch (InvalidOperationException iOpEx)
    Console.WriteLine("Invalid Operation Exception: " + iOpEx.ToString());

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Problems to transfer photos from Vista to iPod Nano

    I´m working with a HP Pavillion laptop based on Vista and an iPod Nano. General connection is ok and I can transfer music. But I have problems to transfer photos. The PC blocks as soon as I start file transfers. In some cases photos are transferred, but quality is very lousy
    What can I do?
    Oliver

    iPod:
    http://discussions.apple.com/category.jspa?categoryID=146
    iTunes for Windows
    http://discussions.apple.com/category.jspa?categoryID=150

  • Problem in Update Statement

    I got some problem in update statement.Can anybody discuss with me regarding my problem? Below is the occured problem.
    //all the declaration like Connection, ResultSet are declared, setting the ODBC path and so on steps have been set up before this method. When compile it, no error, when I start to run my program, the program�s interface is shown, but the following error was appearred and data cannot be updated, can anybody tell me where is my mistake?
    //ERROR:SQL Error in update statement:java.sql.SQLException [Microsoft][ODBC][ODBC Microsoft Access Driver] Syntax Error in UPDATE statement.
    //emp_overview is the table name
    // last_name, first_name, office_phone�.is the attributes of the table
    //this method had declare in the interface class already
    public String updateData (String idd, String ln, String fn, String op,
                   String oe, String hp, String ps, String ss)
                   throws java.rmi.RemoteException
         {//begin of this method
              String result ="";
              try
              Statement statement = connection.createStatement();
              String sql = "UPDATE emp_overview SET" +
              "last_name=' "+ln+
              " ', first_name=' "+fn+
              " ', office_phone=' "+op+
              " ', office_ext=' "+oe+
              " ', home_phone=' "+hp+
              " ', primary_skill=' "+ps+
              " ', secondary_skill=' "+ss+
              " ' WHERE id="+idd;
              statement.executeUpdate(sql);
              statement.close();
              catch (java.sql.SQLException e)
         System.out.println("SQL Error in update statement: "+e);
              //throw a RemoteException with the exception
              //embedded for the client to receive
         throw new java.rmi.RemoteException("Error in Updating exist row into DB", e);
              return result;
         }//end of this method

    Hi Kevin,
    According to the code you have posted, it looks like you are missing a space between "SET" and "last_name". I suggest you add the following line of code:
    System.out.println(sql);
    before the invocation of "executeUpdate()".
    I also suggest you add the following line of code:
    e.printStackTrace();in your "catch" block.
    Hope this helps.
    Good Luck,
    Avi.

  • Problem in Update statement using Execute Immediate

    Hi All,
    I am facing problem in update statement.
    I am creating dynamic sql and use "execute immediate" statement to execute a update statement.
    But it is not updating any thing there in the table.
    I have created a query like :
    update_query='Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
    Execute immediate update_query using V_Id;
    commit;
    But it is not updating the table.
    I have a question , is execute immediate only does insert and delete?
    Thanks
    Ashok

    SQL> select * from t;
                     TID P
                     101 N
    SQL> declare
      2     V_Id          number := 101;
      3     Table_Name    varchar2(30) := 'T';
      4     update_query  varchar2(1000);
      5  begin
      6     update_query := 'Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
      7     Execute immediate update_query using V_Id;
      8     commit;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> select * from t;
                     TID P
                     101 Y                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem in UPDATE statement In Multiple Record Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count 0 THEN
    LOOP
    IF :SYSTEM.last_record 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
    :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    As you do a loop over all the records in the block, of course every record is updated.
    Also, what you do is not the way is intended to be used. In general, you base a block on a table,then there is no need at all for writing INSERT's or UPDATE's. Forms also know's then, which records to be updated and which not.

  • Problem In Update Statement In Multiple Record Data Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count <> 0 THEN
    LOOP
    IF :SYSTEM.last_record <> 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
         VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
              :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;These update statements are without where clause, so it will update all records.
    If it is specific to oracle forms then u may get better help at Forms section.

  • I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    Ask the ACDSee Pro support personnel. 
    With iPhoto that message means the library is a referenced library (photo not copied when imported into iPhoto's structure) and the source file is not where it was when first added to the library.  I don't know how ACDSee works. Does it have a referenced mode as opposed to copying photos into its structure?
    OT

  • Performance of Transfer Statement

    Hi,
      I'm working in a MDMP - Unicode Conversion Project. My job primarily is to enable Custom ABAP code for Unicode syntax.
        I have a generic program which takes the names of tables and fields and the destination path from a file and extracts those table fields to the destination share using transfer statement.
       It is found that this program extracts characters of multiple languages to single file. In the original program there is a single select - endselect loop within which there is a transfer statement.
       Now to accomadate different languages in the same file. I'm collating the data belonging to one language in internal tables and writing the content to the file with a different codepage each time opening and appending to the same file. The approach works good but i face performance issues.
       In the modified version the transfer statement is taking more time than what the transfer statement in the original program is taking. I have no clue of this behaviour. Can someone tell why this change in behaviour of the transfer statement?

    Hi Vijay,
       Let me explain you in detail.
      if i have a transfer statement like this, it is taking approximately 12 seconds to download nearly 50 MB content.
       select * from (extract_info-table) into <tblwa>
       where (where_clause).
       move <tblwa> to o_string.
       transfer o_string to file.
       endselect.
    if i code it this way.
      select * into table <table> from
      (extract_info-table) where (where_clause).
      perform download_file tables <table>
                            using file.
      form download_file tables data_tab
                         using file.
         loop at data_tab.
            transfer data_tab to file.
         endloop.
      endform.
    it is taking 10 times more time ~ 120 secs to download the same content.

  • Problem with Decode statement

    Hi
    I am trying to achieve the following in my report:
    If an employee has a surname of . (dot) or a first name of . (dot), the report should not display a dot. An employee's name is made up of surname, first name and middle name which should all be concatenated together. To try to achieve this, I have the following statement in my report:
    decode(e.Surname, '.', ( LTRIM(RTRIM((INITCAP(e.FIRST_NAME)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    e.FIRST_NAME, '.', ( LTRIM(RTRIM((INITCAP(e.Surname)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    ( LTRIM(RTRIM((INITCAP(e.SURNAME )))||', '||INITCAP(e.FIRST_NAME)||' '||INITCAP(e.MIDDLE_NAME)) ) ) as emp_name
    FROM Employee e
    Problem: The above statement is only working for those employees with surname of . (dot). It's not working for first names of dot. How can I use the decode statement OR is there any other way of doing it without using the CASE statement?
    It seems my decode statement doesn't work with 2 different fields (surname, firstname) being tested within one decode statement.Thanks.

    Thank you so much InoL . I have used the ltrim with Replace but now have a new problem.
    Because I am joining Surname, First name and middle name together and put a comma after the Surname, the name now appears as follows:
    , Maria Ane (if Surname is a dot)
    Boiler, (if first name is a dot)
    I would like to get rid of a comma and only have comma when surname or first name does not have a dot, i.e. for those people with full names e.g. Blake, Anna Marie.
    InoL, how can I achieve this? Thanks.

  • 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 
           

  • Problem with mdx statements generated by CR

    Hello Experts,
    we have a problem concerning mdx-statements produced by Crystal Reports.
    We have built a report upon a query with a variable. Now within one Designer, the generated mdx statement looks like this:
    SELECT {[Measures].[4LPEKDIGEPNC4ENQA7Z0TN7MH]} ON COLUMNS FROM [MC_CO2010/C_BO_BSDB_1] SAP VARIABLES [ZKS__MSM] INCLUDING "432140" : "432140"
    Within another installed designer (same version etc.), the statement looks like this:
    SELECT {[Measures].[4LPEKDIGEPNC4ENQA7Z0TN7MH]} ON COLUMNS FROM [MC_CO2010/C_BO_BSDB_1] SAP VARIABLES [ZKS__MSM] INCLUDING [KSTL].[432140] : [KSTL].[432140]
    And only this version shows the data !
    Personally I know only statements like the last one (variable values in brackets). But only the first one (variable values in double quotes) does work. Does anyone know the reason for this ? How can we then achieve that the CR designer produces statements like the first one ?
    Thanks for your help in advance,
    Frank

    We´ve solved the problem:
    I discovered that on the computer that generated the "" statement, only CR2008 with SP3 was installed. Wheresas on the pc that generated the -statement, SAP Integration Kit (SIK) CR2008 SP3 AND SIK CR2008 Fixpack 3 was installed. So I de-installed SIK CR2008 Fixpack 3 and then both machines generated the same statements with the "".
    @Ingo:
    No, both values had been entered manually, so there was no difference in this. As I wrote above, the only differences where the addionally installed FP3.
    Noneheless, the mdx-statement with the "" seems strange to me. Is this something official ? If I take a look at the description for BW-Specific Enhancement for MDX:
    http://help.sap.com/SAPhelp_nw04/helpdata/en/a7/18533d6dd60610e10000000a114084/content.htm
    the seem to be ok and it is also the way I am used to it.

Maybe you are looking for

  • Problem with Set/Get volume of input device with single channel

    from Symadept <[email protected]> to Cocoa Developers <[email protected]>, coreaudio-api <[email protected]> date Thu, Dec 10, 2009 at 2:45 PM subject Problem with Set/Get volume of input device with single channel mailed-by gmail.com hide details 2:

  • TS1702 how to delete pending download book from iTunes?

    I accidentally downloaded app from iTunes store without noticing that they gave me an e-book together with the app. That e-book file is too big (1GB) that caused me cannot connect to iTunes store. Please let me know how can I permanently delete it fr

  • Microsoft Word 2008 wonays no hard drive space available, which

    I have 196 GB of free hard drive space as well as 4 GB of RAM on my MacBook Pro. No other applications are running. No volumes are mounted to the desktop. I am running the most recent Mac OS (10.5.8) and have installed all Microsoft Office 2008 updat

  • ITunes purchased on another laptop

    Hello All , I recently purchased a new laptop and installed iTunes and successfully synced my iPod. However, I purchased songs from iTunes using my old laptop and when I installed these songs onto iTunes and tried to sync them to my iPod I get an err

  • A question about Performance Settings

             Dear all.                        Hi all,I want add a performance poller about Environmental Temperature.                         There is an error as shown in the figur:                         The device is Nexus 7010.  Is it support  this