Update record from a button

Hi All,
what I need is answered here Re: button and plsql code but still I can't make it work.
I created a button with following properties.
Name: COMPLETE
Button Position: Region Template Position #CHANGE#
Database Action: No Database Action
I created a process called Mark_Complete
Process Point: On Submit - After Computations and Validations
Run Process: Once Per Page Visit (default)
Under Source tab, in Process textarea, wrote below code:
begin
:P14_LAST_UPDATE_DATE := SYSDATE;
:P14_LAST_UPDATED_BY := :APP_USER;
:P14_ORDER_STATUS := 'COMPLETE';
end;
Under conditions tab , in When Button Pressed (Process after Submit When this Button is Pressed), I selected the COMPLETE button which is mentioned above.
Yet when I open a record from a report and click on COMPLETE button, It does not set the Order_Status to 'COMPLETE'.
Using APEX 3.2.1

Hi,
Just check you items (P14_LAST_UPDATE_DATE, P14_LAST_UPDATED_BY, P14_ORDER_STATUS) "Source Used".
It should be "Only when current value in session state is null".
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1

Similar Messages

  • How to update Records from Internal table to u2018Zu2019 table?

    Hi Friends,
    How to update Records from Internal table to u2018Zu2019 table.
    I have records in Internal table , that records want to update on u2018Zmarau2019 Table.
    ( my internal table & u2018 Zu2019 table structures are same.)
    Thanking you.
    Regards,
    Subash

    Hi,
    loop at internal table.
    modify <Z- table > from values < internal table Workarea>.
    if sy-subrc = 0.
      COMMIT work.
    else.
      ROLLBACK waork.
    endif.
    endloop.
    or
    UPDATE <Z- table > from table < internal table Workarea>.
    if sy-subrc = 0.
      COMMIT work.
    else.
      ROLLBACK waork.
    endif.
    Prabhudas

  • Deleting/Updating records from an object table in PL/SQL

    Hello All,
    VER:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    I have created an object and inserted records in it. Is there any way we can delete/update records from it. I do not want to delete based on iteration like delete.collection but I would like to know if we can delete directly from obj like delete from table...
    CREATE OR REPLACE TYPE test_type AS OBJECT
    col1 number,
    col2 varchar2(100)
    CREATE OR REPLACE TYPE tab_type is table of test_type;
    DECLARE
    test_tab tab_type;
    l_cnt NUMBER;
    BEGIN
    select test_type(col1,col2) bulk collect
    into test_tab from (select 1 as col1,'test1' as col2 from dual
                        union all
                        select 2,'test2' from dual);
    IF test_tab.count>0
    THEN
    DELETE FROM TABLE(CAST(test_tab as tab_type)) a
    where a.col1=1;
    END IF;
    l_cnt := test_tab.count;
    END;Thx
    Shank.

    SB,
    I have a scenario wherein I insert few records into a collection table. I'm gonna filter few records from collection table based on the filter.
    I want to delete the records that didn't match the filter. Right now, I'm inserting the records into a physical table and deleting from there. I do no want to use a physical table. Trying to avoid it.
    Would like to delete from collection itself.
    DELETE FROM TABLE(CAST(lv_attr_filter_tab as EDMS_CSPP_DISC_REQ_TAB_TYPE))
                                 WHERE NOT EXISTS (SELECT 1
                                       FROM edms_disc_lines_stg edls
                                       WHERE edls.req_id = edrg.request_id
                                          AND edls.disc_line_id = edrg.discount_id
                                          AND UPPER(edls.disc_status) IN ('ACTIVE');

  • Getting the un updated records from receiver JDBC

    Hi Friends,
         I am doing the Proxy - jdbc integration. Consider my proxy sends 10 records to JDBC to update. Consider bcoz of some reason the jdbc updates only 8 records i need to get the 2 records back to Proxy which is not updated in the DB.
    Should i need to use the Proxy and JDBC channel as syn or seperate integration should be built. I have seen some documents, that we can get the count of the updated records from jdbc receiver, but i dont need the count i need the record which is not been updated.
    How can i do it. please give ur inputs.
    thanks
    Prem

    Unless  you are using SP on JDBC side and explicitly build a record set to send back the data it might not be possible. I am not sure if a custom record set could be returned in JDBC sync receive adapter. You can realize this by updating some other table on JDBC side and then polling that table to update ecc back.
    VJ

  • Error : update record from wizard

    i m trying to build 3 page registration for my website using Developer Toolbox. First i insert records using Insert record from wizard and in the next step i want to update the same record(in the first step i m having upload and resize image). how to get the last insert id and pass the id to URL so that i can retrive the last insert id from the URL and update the same record... somebody please help me....
    Thanks
    Priya_Baer

    Please have a look at the thread I WANT THE RESULT PAGE OF MY INSERT FORM TO BE AN UPDATE FORM OF THE JUST INSERTED DATA where a solution (based on attaching the "last insert id" value to a Session Variable) has recently been provided.
    Cheers,
    Günter

  • Can you do Update Record from an HTML link?

    Can you implement the Update Record server behavior by
    clicking on an HTML link?
    As far as the documentation I've read indicates, the Update
    Record server behavior is only capable of updating a record when a
    Form is submitted.
    I would rather have the action of clicking on an HTML link
    update the record, rather than having a Submit button to update the
    record.
    Is this possible? How do I go about doing this?
    Is

    If you coded the HTML on the page to submit your variables,
    you should be
    able to pull them in to the update page, though you might
    have to manually
    edit some code.
    However, this also means you will always have a link present
    that bots will
    hit (and thus will update your database). Is this what you're
    looking for?
    It certainly doesn't sound like the best method.
    HTH<
    Jon
    "robotai" <[email protected]> wrote in
    message
    news:enk2k1$1l0$[email protected]..
    > Can you implement the Update Record server behavior by
    clicking on an HTML
    > link?
    >
    > As far as the documentation I've read indicates, the
    Update Record server
    > behavior is only capable of updating a record when a
    Form is submitted.
    >
    > I would rather have the action of clicking on an HTML
    link update the
    > record,
    > rather than having a Submit button to update the record.
    >
    > Is this possible? How do I go about doing this?
    > Is
    >

  • Need help: updating records from a node to another node.

    Hi Gurus,
    I guess most of you would be laughing at me but I'll not from Java background but.
    scenario:
    I have a node (eg. Node A) containing some records, say...with keys A,B,C,D,E.
    I also having anothe node (eg Node B) containing the update records of some of the Keys, eg. A,D,E
    How do I update node A with the updated values of node B.
    a ABAP representation would be:
    LOOP AT NODE_B.
      LOOP AT NODE_A.
        IF NODE_A-KEY = NODE_B-KEY.
          MOVE-CORRESPONDING NODE_B to NODE_A.
          MODIFY NODE_A.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    thanks.

    Hi Jansen,
    Are you using model node or value? If it is model node you need store in Node B just reference to model class from Node B. If it is value node then you can store keys of elements from Node A moved to Node B in some java Map implementation.
    Best regards, Maksim Rashchynski.

  • Need help updating records from a subset yielded by a subquery.

    Hi, retired, hobby coder needing (further) help in transact-sql scripting with a view to creating a stored procedure within a Sequel DB.  For the purposes of this investigation I have a table with 23 records.   I am trying to update a specific
    field for 10 of the records based on the (TOP 10) records selected from a sub query where I select the TOP 20 records based upon different field.
    I select my desired 10 records (TOP 10) from a sup query selecting the TOP 20 based upon the date field (latest 20) for a specific user (GID) as follows:
    I then attempt to update only these 10 records as follows:
    As you can see it updated all 23 rows in the table, not just the 10 I yielded by the underlying query.
    In reviewing the documentation it appeared that referencing the Scores_id column and using the 'IN' keyword would work, i.e., UPDATE Scores WHERE Score_id IN (SELECT TOP 10* ..... would be appropriate but I got the an error message, 'Only one expression
    can be specified in the select list when the subquery is not introduced with EXISTS.'
    Can someone assist me with the proper syntax for this script?  Additionally, since there are limitations on the number of variables which can be used any advice on how to structure a stored procedure where the GID is the initial variable and Score_id
    the second would be appreciated also.
    Regards,
    Minuend

    The query you have written will always update all or no rows in the table, since it says
    UPDATE Scores
    SET    ...
    WHERE  EXISTS (...)
    The EXISTS clause is, logically, evaluated for each row. Normally, when you use EXISTS you correlated the subquery with the surrounding query, so that the values the subquery works with are different for each row. But your subquery is uncorrelated, and will
    return the same value, TRUE or FALSE, for each row.
    IN can certainly work, but then you cannot have "SELECT TOP 10 *", but you need to have "SELECT TOP Score_id", since when you use IN, the subquery must be a single-column query.
    Another alternative, which is somewhat difficult to digest the first you see it, but which is more efficient, and more concise, once you have learn it, is to work directly from the query you have:
      WITH CTE AS (
         SELECT TOP 10 *
          FROM (SELECT TOP 20...
     UPDATE CTE
     SET    Used = '*'
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to update record from datagridview

    hi every one 
    am new in .net am developing an inventory system for learning.
    i successfully develop a purchase  form where user can put record for parching invoice.
    as
    and for save record am using flowing code.
    Private Sub btn_Save_Click(sender As Object, e As EventArgs) Handles btn_Save.Click
            Dim connectionStringdgv As String = "Data Source= ABDULLAH-PC;Initial Catalog=Erpdb;Persist Security Info=True;User ID=jabbar;Password=abc123"
            Dim connection As New SqlClient.SqlConnection(connectionStringdgv)
            Dim adaptor As New SqlClient.SqlDataAdapter
            Dim adaptor1 As New SqlClient.SqlDataAdapter
            Dim dataset As New DataSet()
            Dim datasetmax As New DataSet()
            Dim adaptor3 As New SqlClient.SqlDataAdapter
            Dim adaptormax As New SqlClient.SqlDataAdapter
            Dim dataset3 As New DataSet()
            Dim dataset1 As New DataSet()
            Dim cmdinsert As New SqlClient.SqlCommand
            Dim cmdinsert1 As New SqlClient.SqlCommand
            Dim cmduppurtable As New SqlClient.SqlCommand
            Dim cmdupdrcrtable As New SqlClient.SqlCommand
            Dim cmdinsert2 As New SqlClient.SqlCommand
            Dim Cmd As New SqlClient.SqlCommand
            Dim Commandmax As New SqlClient.SqlCommand
            connection.Open()
            cmdinsert1.Connection = connection
            cmdinsert1.CommandText = "INSERT INTO purtrans(date,amount,paid,discount,[bill no],taxvalue,ac,tax)" _
                & "VALUES ('" & DateTimePicker2.Text & "','" & GAmt.Text & "','" & amtpaid.Text & "','" & Tdis.Text & "','" & invo.Text &
    "','" & ttax.Text & "','" & txtCode.Text & "','" & tv.Text & "')"
            cmdinsert1.ExecuteNonQuery()
            'find last id'
            Commandmax.Connection = connection
            Commandmax.CommandText = "SELECT date,MAX(sr) FROM purtrans GROUP BY date"
            Commandmax.ExecuteNonQuery()
            adaptormax.SelectCommand = Commandmax
            Dim maxtable As New DataTable
            adaptormax.SelectCommand = Commandmax
            adaptormax.Fill(maxtable)
            If maxtable.Rows.Count > 0 Then
                SrTextBox.Text = maxtable.Select.Last.Item(1)
            End If
            If connection.State = ConnectionState.Open Then
                connection.Close()
            End If
            connection.Close()
            Dim n, m As Integer
            n = Me.dgv.Rows.Count - 1
            For m = 0 To n - 1
                Dim cd As String = "insert Into amountdrcr(todate,ac,party1,amount,purtransid,qty,rate,billno,disc,tax,weight,sp,drcr) VALUES (@todate,@ac,@Party1,@amount,@purtransid,@qty,@rate,@billno,@disc,@tax,@Weight,'Purchase','Dr')"
                Cmd = New SqlClient.SqlCommand(cd)
                Cmd.Connection = connection
                Cmd.Parameters.AddWithValue("todate", DateTimePicker2.Text)
                Cmd.Parameters.AddWithValue("ac", dgv.Rows(m).Cells("itemcode").Value)
                Cmd.Parameters.AddWithValue("party1", cmbname.Text)
                Cmd.Parameters.AddWithValue("amount", dgv.Rows(m).Cells("Amount").Value)
                Cmd.Parameters.AddWithValue("purtransid", SrTextBox.Text)
                Cmd.Parameters.AddWithValue("Qty", dgv.Rows(m).Cells("Qty").Value)
                Cmd.Parameters.AddWithValue("Rate", dgv.Rows(m).Cells("Rate").Value)
                Cmd.Parameters.AddWithValue("BILLNO", invo.Text)
                Cmd.Parameters.AddWithValue("Disc", dgv.Rows(m).Cells("Disc").Value)
                Cmd.Parameters.AddWithValue("tax", txtPerVat.Text)
                Cmd.Parameters.AddWithValue("Weight", dgv.Rows(m).Cells("Weight").Value)
                connection.Open()
                Cmd.ExecuteNonQuery()
                connection.Close()
            Next
            MsgBox("Your Record save Sucssfully", vbOKOnly, "AANO TECH")
            'posting a credit voucher for supplier'
            If Balance.Text > 0 Then
                Dim cd2 As String = "insert Into amountdrcr(todate,ac,party1,amount,purtransid,billno,sp,drcr) VALUES (@todate,@ac,@Party1,@amount,@purtransid,@Billno,'Purchase','Cr')"
                cmdinsert2 = New SqlClient.SqlCommand(cd2)
                cmdinsert2.Connection = connection
                cmdinsert2.Parameters.AddWithValue("todate", DateTimePicker2.Text)
                cmdinsert2.Parameters.AddWithValue("ac", txtCode.Text)
                cmdinsert2.Parameters.AddWithValue("party1", cmbname.Text)
                cmdinsert2.Parameters.AddWithValue("amount", Balance.Text)
                cmdinsert2.Parameters.AddWithValue("purtransid", SrTextBox.Text)
                cmdinsert2.Parameters.AddWithValue("billno", invo.Text)
                connection.Open()
                cmdinsert2.ExecuteNonQuery()
                connection.Close()
                dgv.Rows.Clear()
                btn_Save.Enabled = False
                invo.Text = ""
                txtCode.Text = ""
                TAmt.Text = ""
                GAmt.Text = ""
                Tdis.Text = ""
                Balance.Text = ""
                ttax.Text = ""
                amtpaid.Text = ""
                txtAddress.Text = ""
                txtPhone.Text = ""
                cmbname.Text = ""
                btnAdd.Enabled = False
                txtQty.Text = ""
                Wk.Text = ""
                txtRate.Text = ""
                txtRate.Text = ""
                txtPerDisc.Text = ""
                txtPerVat.Text = ""
                cmbItemCode.Text = ""
                cmbitemname.Text = ""
                invo.Focus()
            Else
                dgv.Rows.Clear()
                btn_Save.Enabled = False
                invo.Text = ""
                txtCode.Text = ""
                TAmt.Text = ""
                GAmt.Text = ""
                Tdis.Text = ""
                Balance.Text = ""
                ttax.Text = ""
                amtpaid.Text = ""
                txtAddress.Text = ""
                txtPhone.Text = ""
                cmbname.Text = ""
                txtQty.Text = ""
                Wk.Text = ""
                txtRate.Text = ""
                txtRate.Text = ""
                txtPerDisc.Text = ""
                txtPerVat.Text = ""
                cmbItemCode.Text = ""
                cmbitemname.Text = ""
                btnAdd.Enabled = False
                invo.Focus()
            End If
    what is the easiest way for editing record
    please guide me thanks
     

    Hi ABDULLAH,
    >> what is the easiest way for editing record
    What do you mean by “editing record” ? Do you mean that you want to update the record according the textboxes in the form? If so, I am afraid that there is no better way, you need to use the ado.net and the update command to achieve that like you insert
    new records. If you want to modify the record in the datagridview directly, I think you could bind the dataset to the datagridview, and then modify the record in the datagridview, and then save the changes to the database. The link below might be useful to
    you:
    # DataGridview Update
    https://social.msdn.microsoft.com/Forums/en-US/5980181e-f666-4f0a-ab50-c4ebecf96f02/datagridview-update-?forum=Vsexpressvb
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Update records from a table in correct sequence that look from 2 tables and loop

    Hi!
    My question title is kinda unclear but here how it goes.
    I created  2 tables for my BOM (Bill of Materials). I have BOM_Header and BOM_Detail. 
    Below are my sample data. 
    BOM_Header
    Product_ID Int
    Product_Name Varchar(50)
    Cost Numeric(18,2)
    Yield Varchar(50)
    Select * from BOM_Header
    1 Choco Cake 850.00 10
    2 Mixed Flour 700.00 30
    3 Choco Syrup 160.00 10
    4 Egg Formula 2150.00 20
    BOM_Detail
    Product_ID int
    ItemNo Int
    ItemName varchar(50)
    Quantity int
    Unit varchar(50)
    ProdCost numeric(18,2)
    Select * from BOM_Detail
    1 2 Mixed Four 10 Grams 15.00
    1 3 Choco Syrup 20 ML 25.00
    1 4 Egg Formula 20 Grams 10.00
    2 101 Flour 5 packs 80.00
    2 4 Egg Formula 5 Grams 60.00
    3 201 Cocoa Power 2 kg 20.00
    3 202 Sugar 2 kg 60.00
    4 301 Whole Egg 10 pcs 85.00
    4 302 EP12 Formula 25 ml 52.00
    My computation is below.
    BOM_Header = a
    BOM_Detail = b
    a.Cost = b.Quantity  x  b.Product Cost  where a.Product_ID = b.Product_ID
    My problem is how can I automatically compute their Food Cost in  sequence from raw materials to finished products.
    Based on the data, I need to compute first the Egg Formula because it is used as component of  Mixed Flour then compute the Mixed Flour and other component to get the cost of Choco Cake. 
    How can I do this automatically in query to look first in detail if there are ingredients within a sub - ingredients then compute before computing the final cost of the Product. 
    This is because cost of ingredients are changing most of the time and need to recalculate to get the most updated cost.
    Any suggestion is very much appreciated.
    Thank you very much,
    Regem

    >> My question title is kinda unclear but here how it goes. <<
    Then your answers will be unclear, too :(  
    You do not know data modeling, so your data types are wrong. What math are you doing with the product_id? None. This is why identifiers are char(n) and not numeric. They should be industry standards if possible. I like the GTIN.
    You do not even know that rows are not records. 
    Why is the product name fifty characters? Certainly not research! But if you are an ACCESS programmer using a default vale, then you might do this. 
    Besides violating ISO-11179 rules, “<vague>_field” makes no sense! It is a quantity that you put in a  string. 
    CREATE TABLE BOM_Header
    (gtin CHAR(15) NOT NULL PRIMARY KEY,
     product_name   VARCHAR(25) NOT NULL
     unit_cost  DECIMAL(18,2) NOT NULL
      CHECK ( unit_cost >= 0.0.),
     yield_qty INTEGER NOT NULL
       CHECK (yield_qty >= 0));
    >> Any suggestion is very much appreciated. <<
    Get a copy of my book on TREES in SQL and read the chapter on BOM problems. I am not goingto try to post a whole chaper and diagrams to answer this. You are doing the wrong things and have done them poorly. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Update/Insert records from Oracle to MySQL

    Hi team, 
    My application will insert/update records into Oracle database, I need to sync all of records into MySQL database.  I designed a package to load data from Oracle to MySQL, the Oracle database use OLE DB component and MySQL database use ADO.NET.
    How to insert new records into MySQL? If the old record exists, we also need to replace with new record. I did some research, someone suggest to create a stage table to handle this scenario, but I have 14 tables in this case. How to handle this scenario
    with high performance? 
    If there is anything unclear, please let me know. 
    Thank you in advance. 

    Finally, I created 14 tables as same as in our MySQL database system with prefix "updated" , they are use to store the updated records from Oracle system. All of new records we add a flag, the "1" means insert a new record into the system,
    and the "0" means we should updated. So, I can use the conditional split component to split all of new records. The new records insert into the target table and the updated records insert into the "updated_table". Finally, we can add a
    SQL Script task to run a update script to sync all of records. 
    I don't use Lookup Transformation because we must use Cache
    Transform transformation in this case, the Cache connection manager to save the data to a cache file (.caw), it will hard to
    trace the history data in the future.  
    In addition, I recommend to use ODBC connection if somebody face the similar scenario with me, there is a bug  if we use ADO.NET to
    load data from Oracle to MySQL by using SSIS. For more information, please refer the MSDN document: http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx
    @Arthur, thanks again for your input.  Have a nice day! :)

  • Updating multiple records from single form (ASP)

    I have a nested repeat region.
    I have created in the parent, a form with 3 fields and an update button.
    the child records all have multiple columns, 3 of which correspond to the parent.
    Athe parent is bound to the child records by the shipmentID
    I need to be able to update all child records from the form in the parent.
    The case is this.
    The child records are orders with shipdates and frequencies
    The parent contains a form with fields for shipdate and frequency
    The administrator needs to change the shipdate and/or frequency for all child records.
    (The child records are forms as well--but that's another issue that works fine)
    Shipment ID
    Date Field
    Freq Field
    UPDATE Button
    ShipmentID
    Record 1
    Data case1
    Date
    ShipmentID
    Record 2
    Data case 2
    Date
    I am doing this in classic asp with an SQL database.
    So how do I get the form to update all record
    [Subject title edited by moderator to make clear ASP involved]

    Hi,
    This is one of those questions that would require far more explanation that is reasonable to expect in a forum. You should do a little poking around in the nearest Barnes & Nobles. About a half hour in a chare with a good ASP book and vanilla latte should have you on the right track.
    Lawrence   *Adobe Community Expert*
    www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF

  • Updating data from multi record blocks and database

    Hi
    when the user presses a button, records are retrieved from the database and put into multi record item. User can change the data that is retrieved from the database by pushing update button.I tried this code inside update button but it isnt working...
    Begin
    go_block('PRODUCTS');
    first_record;
    LOOP
    update products
    set PRODUCTS.PRODUCT_ID=:PRODUCTS.PRODUCT_ID
    where PRODUCTS.PRODUCT_ID=:CUSTOMER.CUSTOMER_ID;
    exit when :system.last_record = 'TRUE';
    next_record;
    END LOOP;
    forms_ddl('commit');
    clear_block(no_validate);
    End;

    Hi
    when the user presses a button, records are retrieved
    from the database and put into multi record item.
    User can change the data that is retrieved from the
    database by pushing update button.I tried this code
    inside update button but it isnt working...
    Begin
    go_block('PRODUCTS');
    first_record;
    LOOP
    update products
    set PRODUCTS.PRODUCT_ID=:PRODUCTS.PRODUCT_ID
    where PRODUCTS.PRODUCT_ID=:CUSTOMER.CUSTOMER_ID;
    exit when :system.last_record = 'TRUE';
    next_record;
    END LOOP;
    forms_ddl('commit');
    clear_block(no_validate);
    End;Are you getting an error?, what is it that it isn't working?
    One thing you need to understand about the basics of a block:
    If it is a block based on a database table you do not need an external INSERT/UPDATE/DELETE statements from a button or anything.
    Users can change the data retrieved from the database and just press save (which includes only commit_form built in).

  • Can't update mysql records from a web page

    Hi everybody,
    I am beginning with Dreamweaver CS5.
    I followed a video tutorial on how to visually design a data entry/update web page for a mysql database using server behaviors.
    My problem is that I was able to insert records and see inserted records but when I try to update a record it doesn't work.
    I don't get any error message, it just redirects me to the listing page as it's supposed to but doesn't take into account the changes I made.
    Below are 2 printscreens along with the corresponding code.
    Can someone help me please?
    Records list web page :
    Records list code :
    <?php require_once('Connections/dw_nouvellenaissance.php'); ?>
    <?php
    // *** Display of registered users
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users_videostream = "SELECT * FROM videostream_users";
    $users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
    $row_users_videostream = mysql_fetch_assoc($users_videostream);
    $totalRows_users_videostream = mysql_num_rows($users_videostream);mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users_videostream = "SELECT * FROM videostream_users";
    $users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
    $row_users_videostream = mysql_fetch_assoc($users_videostream);
    $totalRows_users_videostream = mysql_num_rows($users_videostream);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Videostream Users List</title>
    </head>
    <body>
    <h3 align="center">Videostream Users List </h3>
    <table  align="center" width="75%" border="1" cellspacing="0" cellpadding="0">
    <tr align="center" BGCOLOR="#99CCFF">
          <th>Surname</th>
          <th>Name</th>
          <th>City</th>
          <th>UserID</th>
          <th>Password</th>
          <th>Edit</th>
          <th>Delete</th>
        </tr>
    <?php do { ?>
        <tr align="center">
          <td><?php echo $row_users_videostream['Nom'];?></td>
          <td><?php echo $row_users_videostream['Prenom'];?></td>
          <td><?php echo $row_users_videostream['Ville'];?></td>
          <td><?php echo $row_users_videostream['user_name'];?></td>
          <td><?php echo $row_users_videostream['user_password'];?></td>
          <td><a href="modifyuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/edit.png" alt="modifier" width="15" height="15" hspace="5" /></a>
          <td><a href="deleteuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/delete.png" alt="supprimer" width="15" height="15" hspace="5" /></a></td>
        </tr>
    <?php } while ($row_users_videostream = mysql_fetch_assoc($users_videostream)); ?>
    </table>
    <p> </p>
    <p align="center"><a href="formlogoutadmin.php">Deconnexion</a></p>
    </body>
    </html>
    </body>
    </html>
    <?php
    mysql_free_result($users_videostream);
    ?>
    Udate records web page:
    Update records code:
    <?php require_once('Connections/dw_nouvellenaissance.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    //*** Update User
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "usersform")) {
      $updateSQL = sprintf("UPDATE videostream_users SET Nom=%s, Prenom=%s, Ville=%s, user_name=%s, user_password=%s WHERE User_id=%s",
                           GetSQLValueString($_POST['Nom'], "text"),
                           GetSQLValueString($_POST['Prenom'], "text"),
                           GetSQLValueString($_POST['Ville'], "text"),
                           GetSQLValueString($_POST['user_name'], "text"),
                           GetSQLValueString($_POST['user_password'], "text"),
                           GetSQLValueString($_POST['User_id'], "int"));
      mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
      $Result1 = mysql_query($updateSQL, $dw_nouvellenaissance) or die(mysql_error());
      $updateGoTo = "showusers.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_users = "-1";
    if (isset($_GET['User_id'])) {
      $colname_users = $_GET['User_id'];
    mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users = sprintf("SELECT * FROM videostream_users WHERE User_id = %s", GetSQLValueString($colname_users, "int"));
    $users = mysql_query($query_users, $dw_nouvellenaissance) or die(mysql_error());
    $row_users = mysql_fetch_assoc($users);
    $totalRows_users = mysql_num_rows($users);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=charset=iso-8859-15" />
    <title>Modify User</title>
    </head>
    <body>
    <h1>Welcome Daniel</h1>
    <h3 align="left">Please modify user fields then click OK</h3>
    <form action="<?php echo $editFormAction; ?>" method="POST" name="usersform" id="usersform">
    <input name="User_id" type="hidden" value="" />
    <table align="left" width="50%">
      <tr align="left">
      <th>Surname: </th><td><input name="Nom" type="text" id="Nom" value="<?php echo $row_users['Nom']; ?>" /></td>
    </tr>
    <tr align="left">
      <th>Name :</th><td><input name="Prenom" type="text" id="Prenom" value="<?php echo $row_users['Prenom']; ?>" /></td>
    </tr>
    <tr align="left">
       <th>City: </th><td><input name="Ville" type="text" id="Ville" value="<?php echo $row_users['Ville']; ?>" /></td>
    </tr>
    <tr align="left">
      <th>User ID:</th><td><input name="user_name" type="text" id="user_name" value="<?php echo $row_users['user_name']; ?>" /></td>
    </tr>
    <tr align="left">
    <th>Password:</th><td><input name="user_password" type="text" id="user_password" value="<?php echo $row_users['user_password']; ?>" /></td>
    </tr>
    <tr align="left">
    <td> </td><td align="left"><input type="submit" name="valider" value="Update" /></td>
    </tr>
    </table>
    <input type="hidden" name="MM_update" value="usersform" />
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($users);
    ?>

    Daniel Cronin,
    This link has information on preparing movies for viewing online by an iPhone:
    https://developer.apple.com/iphone/devcenter/designingcontent.html
    Click on the drop down menu for "Ensure a Great Audio and Video Experience".
    You may need to register for Apple Developer Connection in order to view that information.
    Hope this helps,
    Nathan C.

  • How to update Records of SAP table from .CSV file

    Hi,
    I have written a code which takes a data from (,) delimited CSV file and adds it into the Internal table.
    Now I want to update the all fields in SAP table with the Internal table.
    I want to use Update statement.
    Update <table Name> SET <field needs to update> WHERE connditon.
    I don't want to iterate through thousand on record in sap table to check the where condition.
    Could you please tell me how to do it.

    Hi. I thing you will not workaround the iterating of the internal table.
    You can pre-load all the records into another internal table
    check lt_csv[] is not initial. " important, otherwise next select would read all records of the table
    select .... into lt_dbitab for all entries in lt_csv where key-fieds = lt_csv-key_fields...
    check sy-subrc eq 0 and lt_dbitab[] is not initial.
    then do in-memory update of the it_dbitab
    loop at it_dbitab assign <fs>.
      read table lt_csv assign <fs_csv> with key ... " lt_csv should be sorted table with key, or you should try to use binary search
      if sy-subrc eq 0.
        ...change required lt_dbitab fields: <fs>-comp = <fs_csv>-comp...
      endif.
    endloop.
    ant then you can do mass-update
    update dbtab from table lt_dbitab.
    From performance view, this solution should be much faster than iterating lt_csv directly and updating every single database record
    Br
    Bohuslav

Maybe you are looking for