Recordset - updating 2 tables with 1 recordset using application object update record

I have a recordset that uses a field from 2 different tables
with a select statement where clause that joins a userid. I can
display the field’s data just fine. Now I want to use the
Application object “update record” so I can modify
either of the fields. The problem is the Application object
“update record” only allows you to update one table.
How does Dreamweaver mx 2004 allow me to update 2 tables with one
recordset and 1 submit button? Currently using php.
Example of where:
Where member.userid = member_detail.userid
I tried creating the one form with the field from the first
table and that works just fine. I added the other field from the
other table into the form but ofcourse there isn’t any code
that will update the second table so it won’t work.
My application requires me to update alot of fields between 2
tables at the same time.
Does anyone know a way using Dreamweaver mx 2004 to do this?
I don’t have much php experience.

jon-rookie wrote:
> DreamerJim,
>
> I am sorry but I don't think you are correct. I just
can't believe that with
> all the powers to be at Macromedia and now Adobe can't
figure out how to update
> two tables at once. There are millions of db's out there
that require this. I
> spent several hours today perusing lots of posts on the
internet. It seems I
> am not the only one out there that has asked this
question. Unfortunately
> there are no good answers yet to my surprise.
>
> I did find a Dreamweaver extension that does exactly
what I myself and many
> others want. The problem is it is no longer available
unless you purchase a
> bundle of software from Adobe.
>
> I have not looked into it in detail so I am not 100%
sure that is accurate!
>
> Still, alot of php programmers do this all the time
without much trouble. I
> just want to know if Dreamweaver mx 2004 has the
capability if a person knows
> the right steps.
>
> Hopefully a Dreamweaver expert will post something to
let us know for sure.
> Until then I am stuck.
>
Not even CS3 has this built in, you will either have to code
it yourself
or buy the extension you have found. Dreamweaver gives you
basic
features to help you develop applications, but if you want to
do
anything really clever you have to do it yourself.
One thing to consider is maybe creating an SQL view that is
can be
updated. I am pretty sure it exists, then you use the view
instead of
the table in the update behaviour. I have never done it
myself, but I am
sure it can be done.
Steve

Similar Messages

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • Populating a table with two columns using a custom bean

    hello,
    Can someone provide me or give me a link to an example of populating a table (with two columns) with a custom bean?
    thank you
    fwu

    1)create a java class
    2)have a list as a class variable
    3) populate the list in the constructor..
    4) map the values in the af:table
    //Employee pojo
    public class Employee {
        public Employee() {
            super();
        private String empName;
        private String empManager;
        private String job;
        public void setEmpName(String empName) {
            this.empName = empName;
        public String getEmpName() {
            return empName;
        public void setEmpManager(String empManager) {
            this.empManager = empManager;
        public String getEmpManager() {
            return empManager;
        public void setJob(String job) {
            this.job = job;
        public String getJob() {
            return job;
    //maanged bean
    public class Bean {
    private List<Employee> employee;
        public Bean() {
            super();
            employee = new ArrayList<Employee>();
          Employee e1 = new Employee();
          e1.setEmpName("xxxxx");
          e1.setEmpManager("xxxxxxxx");
          e1.setJob("xxxxxxx");
          Employee e2 = new Employee();
          e2.setEmpName("yyyyyyy");
          e2.setEmpManager("yyyyyyy");
          e2.setJob("yyyyyyt");
          Employee e3 = new Employee();
          e3.setEmpName("zzzzzz");
          e3.setEmpManager("zzzzzzz");
          e3.setJob("zzzzzzzz");
          employee.add(e1);
          employee.add(e2);
          employee.add(e3);
          employee.add(e4);
        public void setEmployee(List<Employee> employee) {
            this.employee = employee;
        public List<Employee> getEmployee() {
            return employee;
        }in the table map like
    <af:table value="#{Bean.employee}" var="row" rowBandingInterval="0"
                        id="t1">
    <af:column headerText="Employee Name" id="c1">
                  <af:inputText value="#{row.empName}" id="it5"/>
                </af:column>
                <af:column headerText="Employee Manager" id="c2">
                  <af:inputText value="#{row.empManager}" id="it2"/>
                </af:column>
    </af:table>

  • Passing an internal table WITH HEADER LINE to abap object

    Hi. In another thread, it was explained how to pass an internal table to an abap object method. Is it possible to pass an internal table that has a header line, and RETAIN the header line once the table has been passed?
    My problem is, that I can pass the table, update it, but the read buffer is not populated when returning from the object's method. This is the result of being able to pass a STANDARD TABLE type, but not a STANDARD TABLE WITH HEADER LINE.
    This means that I have to read the table into a work area instead of doing a READ TABLE LKNA1 within the method, which is what I need to do.
    Thanks.

    Please check this sample program, notice that it is modifing the internal table and passing it back modified as well as passing the "work area" or "header line" back thru the exporting parameter.
    report zrich_0001.
    *       CLASS lcl_app DEFINITION
    class lcl_app definition.
      public section.
        types: t_t001 type table of t001.
        class-data: it001 type table of t001.
        class-data: xt001 like line of it001.
        class-methods: change_table
                                    exporting ex_wt001 type t001
                                    changing im_t001 type t_t001.
    endclass.
    data: w_t001 type t001.
    data: a_t001 type table of t001 with header line.
    start-of-selection.
      select * into table a_t001 from t001.
      call method lcl_app=>change_table
                 importing
                     ex_wt001 = w_t001
                 changing
                     im_t001  = a_t001[] .
      check sy-subrc  = 0.
    *       CLASS lcl_app IMPLEMENTATION
    class lcl_app implementation.
      method change_table.
        loop at im_t001 into xt001.
          concatenate xt001-butxt 'Changed'
               into xt001-butxt separated by space.
          modify im_t001 from xt001.
        endloop.
        ex_wt001 = xt001.
      endmethod.
    endclass.
    Regards,
    Rich Heilman

  • How to update Z table with delivery number using MV50AFZ1

    Hi Friends,
    I am working with user exit MV50AFZ1/ USEREXIT_SAVE_DOCUMENT.
    My requirement is I have a Ztable with delivery number field (initially blank). If I create a delivery thru sales order VA02 , my created delivery number should get populated/updated in my Ztable.
    I would appreciate if someone could help me on this.
    Thanks.

    Hi
    First of all, read SAP Note 415716 - User exits in delivery processing, as for instance, avoid your own COMMIT WORK.
    For instance, as the sample code suggests, the better is encapsulate your ABAP coding in a function module with the option IN UPDATE TASK. Define the interface with the data that you need (XLIKP, XLIPS, XVBUK, and so on), after in your own coding (for instance)
    FUNCTION Z_SAVE_DELIVERY
         IMPORTING
           VALUE(IM_LIKP) TYPE SHP_LIKP_T.
       DATA: w_zeta LIKE z_table.
       DATA: ty_likp TYPE likp.
      LOOP AT im_likp INTO ty_likp.
         MOVE-CORRESPONDING ty_likp TO w_zeta.
         MODIFY z_table FROM w_zeta.            "or your own algorithm, searching records and modify them.
      ENDLOOP.
    In the userexit you can do this coding:
      CALL FUNCTION 'Z_SAVE_DELIVERY' IN UPDATE TASK
          EXPORTING
                im_likp = xlikp.
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Jun 21, 2011 5:49 PM

  • How to proces the record in Table with multiple threads using Pl/Sql & Java

    I have a table containing millions of records in it; and numbers of records also keep on increasing because of a high speed process populating this table.
    I want to process this table using multiple threads of java. But the condition is that each records should process only once by any of the thread. And after processing I need to delete that record from the table.
    Here is what I am thinking. I will put the code to process the records in PL/SQL procedure and call it by multiple threads of Java to make the processing concurrent.
    Java Thread.1 }
    Java Thread.2 }
    .....................} -------------> PL/SQL Procedure to process and delete Records ------> <<<Table >>>
    Java Thread.n }
    But the problem is how can I restrict a record not to pick by another thread while processing(So it should not processed multiple times) ?
    I am very much familiar with PL/SQL code. Only issue I am facing is How to fetch/process/delete the record only once.
    I can change the structure of table to add any new column if needed.
    Thanks in advance.
    Edited by: abhisheak123 on Aug 2, 2009 11:29 PM

    Check if you can use the bucket logic in your PLSQL code..
    By bucket I mean if you can make multiple buckets of your data to be processed so that each bucket contains the different rows and then call the PLSQL process in parallel.
    Lets say there is a column create_date and processed_flag in your table.
    Your PLSQL code should take 2 parameters start_date and end_date.
    Now if you want to process data say between 01-Jan to 06-Jan, a wrapper program should first create 6 buckets each of one day and then call PLSQL proc in parallel for these 6 different buckets.
    Regards
    Arun

  • How to hide table with empty content using Javascript?

    Hello!
    I'm using Adobe LiveCylce Desinger integrated in SAP. I have a task to hide a database-table, if the table empty is.
    Normmaly we can do following to check, whether the content empty is.
    if (this.REMARK_TEXT.rawValue == null )
    this.presence = "hidden";
    else
    this.presence = "visible";
    The question is, how to check in Javascript, if a table empty is.
    Many thanks in advance!
    regards
    longholiday

    could try something like this:
    function showOrHideTable(table){
         var isVisible = false;
        // gets the count of instance managers, event_initialize and row objects
        var rowCount = table.nodes.length;
        for(var i=0; i<rowCount; i++)
            //get the class name
            var myTestNode = table.nodes.item(i).className;
            //ignores the instance managers and event_init
            if(myTestNode == "subform")
                var innerCells = table.nodes.item(i).nodes;
                for(var j=0; j<innerCells.length; j++){
                    //ignores non-input boxes
                    if(innerCells.item(j).className == "field")
                        //check value
                        if(innerCells.item(j).rawValue != ""))
                            isVisible = true;
                        else
                            //hide the row
                            table.nodes.item(i).presence = "hidden";
        //if any row has a value specified
        if(isVisible)
            table.presence = "visible";
        //no value specified
        else
            table.presence = "hidden";

  • How to find table with colum that not support by data pump network_link

    Hi Experts,
    We try to import a database to new DB by data pump network_link.
    as oracle statement, Tables with columns that are object types are not supported in a network export. An ORA-22804 error will be generated and the export will move on to the next table. To work around this restriction, you can manually create the dependent object types within the database from which the export is being run.
    My question, how to find these tables with colum that that are object types are not supported in a network export.
    We have LOB object and oracle spital SDO_GEOMETRY object type. our database size is about 300G. nornally exp will takes 30 hours.
    We try to use data pump with network_link to speed export process.
    How do we fix oracle spital users type SDO_GEOMETRY issue during data pump?
    our system is 32 bit window 2003 and 10GR2 database.
    Thanks
    Jim
    Edited by: user589812 on Nov 3, 2009 12:59 PM

    Hi,
    I remember there being issues with sdo_geometry and DataPump. You may want to contact oracle support with this issue.
    Dean

  • Sort a table with two columns based on the first

    I have a powershell table with the columns 'Used Perc' and 'ID'.
    This was formed from the following 
    $a = @{Expression={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)};Label="Used Perc";width=25}, @{Expression={$_.nStatisticalDiskIdentificationID};Label="ID";width=15}
    $GLOBAL:CSV2 = Import-CSV $STATDISKOUT | Format-Table $a
    Before this, the file $STATDISKOUT had the columns 'nUsed_Avg', 'nSize', and 'nStatisticalIdentificationID'.
    My question is, how would I sort the new table based on 'Used Perc' but keeping the corresponding 'ID' column lined up to the right value?

    We use a select statement to reorder columns and recalculate,  The formatters just go at the end to adjust the display.
    Import-Csv <file> | select <column order format> | Format-Table
    or you can do it in the table:
    Import-Csv <file | Format-Table -Properties ,f1.,f2.,,f3....Here is how to inset a sort inline:
    $a=@{
    L='ID';
    E={$_.nStatisticalDiskIdentificationID};
    L='Used Perc';
    E={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)}
    Import-CSV $STATDISKOUT | Select $a | Sort 'Used Perc' | Format-Table -Auto
    ¯\_(ツ)_/¯

  • How to display a table with rows and columns?

    Hi All,
    I am new to IPhone development,
    In my app user has to pick date from control, I had used UIDatePicker but user cannot pick year from that. so I wanted to write my own calendar view i.e A table with 6x7 cells using UITable.
    code snippet or any information on this will be appreciated.
    Thanks,
    Vashek

    I don't believe that the UITable on the iPhone supports mutiple columns. It is just a list of table cells. Each cell can have its own subset of controls (views) and I suppose this may be one way to give you what you want. But it seems like it would almost be better just to make your own table -- a view that contains the grid of subviews -- and lay that out in the parent view.
    I haven't had any experience with the UIDatePicker yet, though I can see it doesn't support year ... Why not build your own custom picker? It seems that would be a lot less hassle, and maybe more intuitive for the user, than building a full calendar view, especially if what you wanted initially was a picker anyway.
    Edit: I feel bad ... I didn't read through all the modes of UIDatePicker -- it does have a mode that supports year (UIDatePickerModeDate).
    Kevin
    Message was edited by: JediRunner

  • Insert recordset in 2 tables with the same id

    Hello,
    I have two tables with the columns
    CAR                              Client
    clientId[FK]                  clientId [PK]
    carId[PK]                        name
    brand                           surname
    type 
    I made a form with textfields
    Brand
    Surname
    Name
    Type 
    and I want thru Insert Recordset wizard to pass the cliendId in both tables.
    How can I do this?

    You can do this by not relying on the recordset wizard and simply coding it yourself to INSERT data to tables. Or use wizard to insert into one table and modify code to allow insert into two tables.
    best,
    Shocker

  • Unable to filter a recordset using a session  variable

    I have a volunteer application page and when the volunteer presses <Submit> their info is saved in a MySQl db table and a session variable is created containing the primary key of their record in the table, control is then passed to a "success page". The success page can access the session variable (I proved this by displaying the session variable on the success page) so my next step was to create a recordset in the success page with a filter using the session variable to select the appropriate row in the table, allowing me to display to the volunteer the info they submitted.
    I set up a test success page which displays the session variable and one field of the volunteer info. When I test this I see the session variable displayed but the corresponding volunteer info field from the recordset is not displayed.
    The volunteer application page is here www.hollisterairshow.com/volunteerapp.php and the successpage is here www.hollisterairshow.com/thanksvol.php
    The code that creates the session variable in the volunteer application page is shown below
    $_SESSION['volunteer_id'] = mysql_insert_id();
    The code to display the session variable in the success page is shown below
    <?php  echo $_SESSION['volunteer_id']; ?>
    The code to display the volunteer info is shown below
    <h1> Thank You <?php echo $row_rsVolunteerApp['firstname']; ?>!! </h1>
    The recordset definition is shown below
    The success page test result is shown below, as you can see the volunteer's first name is not displayed immediately after the "Thank you" message but the session variable holding the correct primary key (41) is shown correctly.
    Does anyone have an idea of what I'm doing wrong?
    Thanks
    Tony

    Where did you put session_start()? It needs to be before the variable is accessed. It's obviously before the line that displays the value in your page, but is it before the SQL query is generated?
    Also, have you checked in phpMyAdmin to see whether volunteernumber 41 has any values in the database?

  • How do I Loop through a recordset using PHP

    I have a recordset containing a MySql table with 5 columns, each one containing an email address of an official in a club.
    Each row represents a different club, and each column a different type of official.
    The first column represents chairmen, the next treasurers etc...
    The recordset is called $mailset.
    I need to loop through each row of $mailset and extract the email addresses of each column and concatenate them into a string seperated by semi colons ; so it ends up like this:
    [email protected];[email protected];[email protected]; and so on.
    This is how the recordset is set up:
    mysql_select_db($database_dummyread, $dummyread);
    $query_mailset = "SELECT club_chair_email, club_treas_email, club_sec_email, club_delegate_email, club_deputy_email FROM clubs";
    $mailset = mysql_query($query_mailset, $dummyread) or die(mysql_error());
    $row_mailset = mysql_fetch_assoc($mailset);
    $totalRows_mailset = mysql_num_rows($mailset);
    ?>
    I tried using a  loop to step through the recordset, but it always shows the first record, so its not moving the pointer through the file.
    The pseudo code aught to be something like this:
    Initialise variables and move to the first record
    If there are records to process
                   Read a record
                        Process all columns
                Move on to the next record
    else
         if there are no records
              print an error message
    else
    Print the results.
    Can anyone give me a hint as to how to move from row to row in a recordeset under the control of a loop.
    I am using PHP and MySql. (as far as I know, it is the original - not PDO or MySqli)

    Each call to mysql_fetch_assoc($mailset) retrieves the value at the current location and increments the pointer in the recordset array. So use either a do or while loop and call mysql_fetch_assoc($mailset) from within the loop.
    From the docs:
    Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter. It only returns an associative array.

  • URGENT  update a table with a text that has a single quote in it

    Hello, I am trying to update a table with a text that has a single quote in it. I believe I need to use two singles quotes but I am not sure how.
    For example:
    UPDATE TEST
    SET DESCRLONG='Aux fins d'exportations'
    WHERE etc...
    Should I put 2 singles quotes before the quote in the text?
    UPDATE TEST
    SET DESCRLONG='Aux fins d'''exportations'
    WHERE etc...
    Thank you very much :)

    The best way depends on the version of Oracle.
    But, the quick and universal answer is to use two single quotes
    SQL> connect test/test
    Connected.
    SQL> create table test (descrlong varchar2(128));
    Table created.
    SQL> insert into test values ('This is a string with a '' single quote');
    1 row created.
    SQL> select * from test;
    DESCRLONG
    This is a string with a ' single quote
    SQL> update test set descrlong='Aux fins d''exportations'
      2  where descrlong like 'T%';
    1 row updated.
    SQL> select * from test;
    DESCRLONG
    Aux fins d'exportations
    SQL>                                             

  • Problem with update of BLOB field in a table with compound primary key

    Hi,
    I've been developing an application in Application Express 3.1.2.00.02 that includes processing of BLOB data in one of the tables (ZPRAVA). Unfortunately, I've come across a strange behaviour when I tried to update value in a BLOB field for an existing record via a DML form process. Insert of a new record including the BLOB value is OK (the binary file uploads upon submiting the form without any problems). I haven't changed the DML process in any way. The form update process used to work perfectly before I'd included the BLOB field. Since than, I keep on getting this error when trying to update the BLOB field:
    ORA-20505: Error in DML: p_rowid=3, p_alt_rowid=ID, p_rowid2=CZ000001, p_alt_rowid2=PR_ID. ORA-01008: not all variables bound
    Unable to process row of table ZPRAVA.
    OK
    Some time ago, I've already created another application where I used similar form that operated on a BLOB field without problems. The only, but maybe very important, difference between both the cases is that the first sucessfull one is based on a table with a standard one-column primary key whereas the second (problematic one) uses a table with compound (composite) two-column PK (two varchar2 fields: ID, PR_ID).
    In both cases, I've followed this tutorial: [http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm]).
    Can anybody confirm my suspicion that Automatic Row Processing (DML) can be used for updating BLOB fields within tables with only single-column primary keys?
    Thanks in advance.
    Zdenek

    Is there a chance that the bug will be included in the next patch?No, this fix will be in the next full version, 3.2.
    Scott

Maybe you are looking for

  • Use of filter to JSF faces servlet

    Hi I have a JSF application which is secured by a custom security framework (similar to SITE MINDER). The security framework after authentication passes the authenticated user name within a in-memory session cookie. The entire user information like h

  • Why is The Daily Show no longer available in UK iTunes Store?

    I've noticed Jon Stewarts The Daily Show is no longer available in the UK iTunes Store. Will this be permanent?

  • Oracle Financials for India - Local Chart of Account

    Hi, We have to implement Oracle Financials for India, I know that the calendar is from APR-MAR, but my question is: Is it needed to report the statutory books in a local Chart of Accounts or we can use our corporate ones based in US GAAP. Thanks and

  • Determinations Server - Plugin installation

    I have created a rule base plugin to load the rulebases from a database and I would like to deploy and get this working in Determinations Server. Here are the steps taken so far: Step 1. Deployed vanilla determinations-server WAR to Websphere. Follow

  • Retreival of Report Painter Group.

    Suppose a Report Group has been deleted. Can we any way retrive that? The report group is the standard Report Group. regards