Database Update Problem

Hi All,
I am having a table control on a screen, I am updating the table control rows and then saving , I want all the rows in the table should get modified in the database table, for this I am using the code below  but it is giving a runtime error 'SAPSQL_ARRAy_INSERT_DUPREC.
Please Suggest.
form update_database.
  data: lt_del_rows type table of ZEXC_REC,
        lt_ins_keys type g_verifier->zexc_rec_keys,
        l_ins_key type g_verifier->ZEXC_REC_key,
        ls_ZEXC_REC type ZEXC_REC,
        ls_outtab like line of gt_outtab,
        lt_instab type table of ZEXC_REC.
§8.When all values are valid, use your internal tables
   to update your table on the database.
First delete lines in data base according to the
keys you remembered within 'g_verifier'.
Imagine a user deleted a row and then entered one with
the same key fields like the deleted ones.
Then both tables (deleted_rows, inserted_rows) have got
an entry of this row.
So if you first inserted the new rows in the data base
and then deleted rows according to 'deleted_rows'
The reentered rows would be lost.
1.Delete Lines:
  call method g_verifier->get_deleted_rows
          importing deleted_rows = lt_del_rows.
  delete ZEXC_REC from table lt_del_rows.
2.Insert Lines:
  call method g_verifier->get_inserted_rows
          importing inserted_rows = lt_ins_keys.
  loop at lt_ins_keys into l_ins_key.
    read table gt_outtab into ls_outtab
     with key LIFNR = l_ins_key-LIFNR
              DOCNO = l_ins_key-DOCNO
              DOCTYP = l_ins_key-DOCTYP
              HIERNO = l_ins_key-HIERNO
              matnr = l_ins_key-matnr.
    if sy-subrc eq 0.
      move-corresponding ls_outtab to ls_ZEXC_REC.
      append ls_ZEXC_REC to lt_instab.
    endif.
  endloop.
  insert ZEXC_REC from table lt_instab.
  commit work.
Insert first default row for ARE1 document
§9.Refresh your internal tables.
  call method g_verifier->refresh_delta_tables.
endform.
Thanks.

You have to write like this
INCLUDE <icon>.
* Predefine a local class for event handling to allow the
* declaration of a reference variable before the class is defined.
CLASS lcl_event_receiver DEFINITION DEFERRED.
CLASS cl_gui_container DEFINITION LOAD.
DATA : o_alvgrid          TYPE REF TO cl_gui_alv_grid,
       i_selected_rows TYPE lvc_t_row.
CLASS lcl_event_receiver DEFINITION.
*   event receiver definitions for ALV actions
  PUBLIC SECTION.
    CLASS-METHODS:
* Status bar
       handle_user_command
        FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING e_ucomm,
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD handle_user_command.
* In event handler method for event USER_COMMAND: Query your
*   function codes defined in step 2 and react accordingly.
    CASE e_ucomm.
      WHEN 'FCODE'.
        CALL METHOD o_alvgrid->get_selected_rows
          IMPORTING
            et_index_rows = i_selected_rows
        IF i_selected_rows[] IS INITIAL.
          MESSAGE i153 WITH text-009.
          LEAVE LIST-PROCESSING.
        ENDIF.
  WHEN OTHERS.
    ENDCASE.
  ENDMETHOD.
Have you tried similar to this.
Check for the parameters in get_deleted_rows.
The function should retrieve teh deleted rows when you press a delete button.
So write the code in the user_command for delete functionality.
Make sure all these are there in ur program.
Also SET HANDLER FOR user command should be there.
Verify whether get_deleted_rows is available in the method.

Similar Messages

  • Database updation problem from textbox input

    Hi everybody
    I am new to java technology .. Plz help me out ...
    I am having a problem with this code in one JSP page ..
    I am not able to retrive value stored in text box with request.getParameter method whose initial value is assigned by retriving value from database ...
    Also Not able to update these values back to database ...
    Here is the code ...
    <%@ page language="java" import="java.sql.*" import="java.lang.*" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"> <% String Susername; Susername = session.getAttribute( "theUsername" ).toString(); %> <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title>Edit details</title>     </head>     <body>     <table border="0" cellspacing="10" > <thead> <tr>     <%@ include file = "Logtab.jsp" %> </tr> </thead>     <% String Empname,EmpID,Address; Empname = request.getParameter("Empname");   EmpID = request.getParameter("EmpID");   Address = request.getParameter("Address"); Connection connection = null; PreparedStatement statement = null; ResultSet rs = null; response.setContentType("text/html");   try { Class.forName("com.mysql.jdbc.Driver"); connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/fts","root","admin");                                               statement = connection.prepareStatement("SELECT empname,empid,address FROM emp Where empid='admin'");                                    rs = statement.executeQuery();                                   while(rs.next()){                 %>                 <tbody><form name="DetailsForm" action="AdminHome.jsp" method="POST"> <tr>     <table width="80%" border="0">   <tr>     <td>Name</td>     <td><input name="Empname" type="text" value="<%= rs.getString(1) %>"></td>   </tr>   <tr>     <td>Employee ID</td>     <td><input name="EmpID" type="text" readonly="true" value="<%= rs.getString(2) %>"></td>   </tr>   <tr>     <td>Address</td>     <td><input name="Address" type="text"  value="<%= rs.getString(3) %>"></td>   </tr>   <tr>   <td><input type="submit" value="Submit" name="Submit" /></td>   <td><input type="reset" value="Reset" name="Reset" /></td>   </tr> </table> <%                }                       rs.close();                   Statement s = connection.createStatement();                                  String q = "UPDATE emp SET empname='"+ request.getParameter("Empname") +"' , address ='" +request.getParameter("Address") +"' WHERE empid ='admin'";                                 s.executeUpdate(q);                                                       statement.close();                 s.close();                 }                 catch(SQLException se ) { System.out.println("SQL Exception generated "); }                 %> </tr> </form> </tbody> </table>     </body> </html>

    Have you tried adding single quote (') before and after %
    cmdSearch.Parameters.Add("@search",
    SqlDbType.VarChar).Value
    = "\'%" + txtContactFirstName.Text
    + "%\'";
    cmdSearch.Parameters.Add("@StId",
    SqlDbType.VarChar).Value
    = "\'%" + txtContactID.Text
    + "%\'";

  • Updation problems in MSAccess

    hi
    i have a problem
    My client needs a front end application for the database application. they are using MS Access as there database. the problem is in the the table headers have namespaces so as
    table name :Training
    field name : date of joining
    field name :Trainers name
    and so on.........
    I am facing problem updating the table as it gives "invalitd update statement"
    The problem as far as i could see is the name spaces
    How do i check the problem
    I could not find the solution any were else so please help
    thank you
    vinay

    1.Recheck the syntax -
    It should be :
    UPDATE Table_name SET column1=value1,col2=val2
    WHERE ...
    2.If u r sure about the SQL statement,
    try to create a dummy table whose columns don't have any spaces(U can use underscores)
    Run the program to ascertain your assumption.

  • Locking issue in workflow with conseutive database update

    Dear Workflowers,
    We are in ECC 5.0 and release 6.40. We went live for SAP in February and we are currently using workflow in PLM module for DMS and ECM.
    We have been facing this locking issue randomly happened in our production and quality system. The error from workflow log is "Document XXXX is locked by WF-BATCH". I have two steps in workflow one is to update the document user( from originator to editor with custom BO "zdraw" new method "setuser") and the next step is to update the document status( BO "zdraw" "setstatus" method which inherited form standard BO "draw").  
    I have tried to use "wait" (1st try) , statements  "BAPI_DOCUMENT_ENQUEUE", "BAPI_DOCUMENT_DEQUEUE" (2nd try) and  "Commit work and wait" (3rd try) to add one step in between, however the issue remains.
    The other question I had was we need to write "commit work" when we use BAPI to perform database update in the ABAP program. But I don't see "commit work" in the method of BO(for example "setstatus" in "draw" object) which performs database update. How does workflow perform DB update properly without "commit work" by referencing standard method?
    Could anyone please share your expertise with the issue I am facing?
    Thank you in advance,
    Merta

    Hi Merta,
    Regarding COMMITs: theoretically you should never use COMMIT statements because the Workflow runtime handles that - the transaction of executing the task is the LUW, not your method. By adding COMMIT WORK you are also committing the workflow task execution.
    In practice however there are the occasional exceptions where something just won't work without an explicit commit - but the theory remains that you should always try it without.
    Regarding your problem, the one way to be certain that a DB update is complete is to use a terminating event - either through change documents or status management.
    Failing that, you can write a wrapper method for SETSTATUS that does something like:
    do 10 times.
      try to lock it.
      if success.
        unlock.
        swc_call_method self 'SetStatus' container.
        set success flag.
      else.
        wait up to 3 seconds.
      endif.
    enddo.
    if no success, raise exception.
    Cheers,
    Mike

  • To perform database update in a module with AT EXIT-COMMAND addition

    Dear All,
    I have a function code 'EXIT' with function type 'E'. When this function code is triggered, my screen should close.
    In the module that handles this function code (defined with AT EXIT-COMMAND addition), I will prompt the user whether he/she want's to save the data before exiting with the POPUP_TO_CONFIRM_STEP function module. The text message in the dialog box is "Do you want to save before exiting?".
    When the user wants to save the data, a simple UPDATE statement will be executed to write the data on screen to database.
    The problem here is since the module is defined with AT EXIT-COMMAND addition, the data on screen won't be copied to their corresponding variable on the code (correct me if I'm wrong). Therefore, even though database update is performed, the data written to database are no different that the original.
    How to perform database update in a module with AT EXIT-COMMAND addition?
    or
    Is it even a "custom" or a "good practice" to prompt user to save data before exiting?
    Thanks in advance,
    Haris

    With an exit command, if there's anything that would be lost, I would prompt "Data will be lost, do you wish to continue?". If they do, the database is not updated, if they don't, they stay in the transaction.
    This is because the exit command runs before validation. So how can you know the data is correct?
    If you have a button to leave the transaction that isn't an exit command, then you could prompt to save instead. There the choices should be - quit without saving, save and quit, don't quit.
    Doing a database update in an exit command is not a good idea.
    matt
    Edited by: Matt on Mar 15, 2011 11:53 AM

  • Database termination Problem

    Hi every body ..plz help me on this..
    We are facing database termination problem in ECC6 production syste.
    Database: Oracle 10.2, O/S: Windows 2003. Spam  :27, SP level 13.
    Error is:
    Errors in file f:\oracle\p02\saptrace\background\p02_ckpt_6520.trc:
    ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF'
    ORA-27072: File I/O error
    OSD-04008: WriteFile() failure, unable to write to file
    O/S-Error: (OS 33) The process cannot access the file because another process has locked a portion of the file.
    When we are performing backup then data base termination occuring freequently.
    Give right solution as early as possible.
    Thanks,
    Nani.

    Hi,
    Have a look at below snote which actually speaks about the oracle error codes
    Snote :  546006
    within the Snote it says :-
    " If you cannot access a database file (for instance a data file, control file or RedoLog) for whatever reason, an ORA-270xx appears. The actual cause comes from additional error messages (usually in the operating system) that occur on ORA-270xx. "
    And as per your last update
    " ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF' "
    i think there is problem accessing the database control file. Hence you  are facing the above problem.
    I think if you recreate your control file i think, it should resolve the problem.
    Hope it will be helpful to resolve your problem.
    Rgds
    Radhakrishna D S

  • Multiple database updates vesus Tansaction

              Hi,
              I need some help from you great minds. Here us what I am trying to accomplish:
              I have a message driven bean which does a multiple update calls to an Oracle database.
              I want to commit all the db updates only at the end (after all update calls execute
              okay) and if there occurs any problem in any of the update calls, I want to rollback
              all the previously successful update calls I have already made. I am using container
              managed transaction via a mdb.
              I tried to use UserTransaciom.setRollbackOnly() call but that did not completely
              help. This call rolled back the message altogether. All I wanted to do is, if
              there occurs any error during a database update, rollback just the database changes
              and just throw away the message. Is there a way I can just rollback the database
              changes? Any suggestions?? please. Thanks
              

    If I understand correctly what you want to do, is the purpose to do some task or run some script in multiple databases on the same server?
    If so, this is done easily by listing the database (sids) in a file and reading the file in a loop statement.
    In my case, I simply create a file on the server called localsids. I keep this in /var/opt/oracle directory.
    Then, in my script, I set:
    SIDFILE='/var/opt/oracle/localsids'
    NEWPASS=`cat $HOME/.xlh/sys`
    # This loop reads through the 'sidlist' and then looks for a password
    # stored in a separate directory for each sid, but if individual
    # directories do not exist, then it uses the standard system password.
    # It then opens a sqlplus session for each sid (as it loops through the
    # sidfile and executes some sql statement(s), or executes a sql script.
    cat $SIDFILE | while read SID
    do
    ORACLE_SID=$SID
    export ORACLE_SID
    echo $SID # this is only for my own verbose purposes
    sqlplus -s system/manager@$SID <<EOF > /tmp/chg_passwd_${SID}.sql
    alter user system identified by $NEWPASS
    alter user sys identified by $NEWPASS
    EOF
    done
    exit
    # In the above example, i am changing the sys and system passwords for all databases listed in the localsids file.
    Hope this helps...
    ji li
    Message was edited by: ji li to simplify the example...
    I have simplified the above example to hardcode the system password into this script, however, normally I would never do this in real practice. This is just as an example to simplify how to run a loop to run a common script or sql statement in each database.

  • CcBPM, Async Messages and database update performance

    We have several business processes defined and running in XI 3.0. Some are being invoked as web services.
    Our performance/scalability is extremely poor. We believe the problem is the database, which apparently is being updated at a phenomenal rate. The database disk I/O is exceptionally high, and has been tracked to writing to the database container/table files and tranaction logs. The database has been carefully tuned, and we are rushing to migrate the db to a higher capacity machine.
    It would seem, based on documentation, that the database updates are a result of the asynch message interfaces we are using through the business processes. 
    The first question is are we correct in the above statement?
    The second question is are the db updates being done under a transactional scope, if so what is the isolation level of the update, and can we change the isolation level?
    Third question, if the updates are due to the asynch message interfaces, can we use synch message interfaces and reduce the database work? If so, how?
    Finally,

    I don't think you'll find a documented general number of application variables you can have on a single server. But I think you could get away with 400 variables without any trouble.
    Where you might run into trouble, though, is when you have multiple concurrent requests trying to read and change these values. You'll have to ensure that you single-thread write access to these variables using CFLOCK.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/
    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
    GSA Schedule, and provides the highest caliber vendor-authorized
    instruction at our training centers, online, or onsite.

  • Constructing Database Update DML Statements

    This is a very common problem I am sure but want to know how others handle it. I am creating a web application via Servlets and JSPs. I am working with Oracle 10g.
    Here's the problem/question.
    When I present an html form to a user to update an existing record, how do I know what has changed in the record to create the dml statement? I could just update the entire record with the values supplied via the POST data on submit but that does not seem right since maybe only 1 out of 10 fields actually changed. This would also write needless audit and logging information to the database. I have thought about comparing the Request parameters sent with the post with the original java bean used to populate the form in the first place by adding it back to the request as an attribute. Is this the only way to do it or is there a better way?
    Thanks everyone,
    -Brian

    What database drivers are you using? I recall there being some bug in
    sp2 that caused delayed transaction commits for a very specific
    combination of transaction settings and database drivers.
    I think it was third-party type II Oracle drivers and local
    transactions, but I'm not sure.
    In any case, I'd contact support as there is a patch available.
    David
    Gurjit wrote:
    Hi all,
    I have posted something of this sort earlier too. The problem is that
    the database is not reflecting what has been updated using queries from the
    application.
    THe structure of the application is as follows.
    DB = Oracel 8.1.6
    Web Server = iPlanet 4.0
    App Server = iPlanet 6.0 sp2
    The database is connected to via the EJB's. No Database transactions are
    being used except for Bean transactions which are container managed. The
    setAutoCommit flag is set to true. Each query is a transaction. The jsp's
    call these ejb's through wrapper classes. As stated earlier the database
    updates (Inserts, update, delete statements) are not getting reflected in
    the database immediately. The updates happen after a gap of about 7-10
    minutes. Why is this sort of behaviour coming up. This is almost like batch
    updates happening on the database. Is there a setting in IPlanet for
    removing this kind of problem.
    Regards,
    Gurjit

  • Database update failed for some organizations when installing Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1

    Hi, 
    We get the following error in the logfile when we try to install the latest update for CRM: (KB2953252)
    Does anyone know how to fix this problem? 
    09:10:41|   Info| Database update install failed for orgId = 35e7ca08-43fb-4440-ba18-acfc3f42e115.  Continuing with other orgs.  Exception: System.ArgumentNullException: Value cannot be null.
    Parameter name: type
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
       at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.OrgInstall(ArrayList orgIdArray)

    Hi, 
    We get the following error in the logfile when we try to install the latest update for CRM: (KB2953252)
    Does anyone know how to fix this problem? 
    09:10:41|   Info| Database update install failed for orgId = 35e7ca08-43fb-4440-ba18-acfc3f42e115.  Continuing with other orgs.  Exception: System.ArgumentNullException: Value cannot be null.
    Parameter name: type
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
       at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.OrgInstall(ArrayList orgIdArray)

  • AUXILIARY database update using full backup from target database

    Hi,
    I am now facing the problem with how to implement AUXILIARY database update to be consistent with the target database during a certain period (a week). I did a fully backup on our target database everyday using rman. I know it is possible to use expdp to realize it but i want to use the current fully backup to do it. Does anybody has idea or experience with that? Thanks in advance!
    Regards,
    lik

    That's OK. If you don't use RMAN to clone your database. You can create a database just using the cold backup of the primary database simply.
    Important things are
    1) you must catalog all datafiles as image copy level 0 in the cloned database
    RMAN> connect catalog rman/rman@rcvcat (in host 1)
    RMAN> connect target sys/manager@clonedb (in host 2)
    RMAN> catalog datafilecopy
    '/oracle/oradata/CLONE/datafile/abc.dbf',
    '/oracle/oradata/CLONE/datafile/def.dbf',
    '/oracle/oradata/CLONE/datafile/ghi.dbf'
    level 0 tag 'CLONE';
    2) You need to make incrementals of the primary database to refresh the clone database.Make sure that you need to specify a tag for the incremental and the name of tag is the exactly same as the one used step (1).
    RMAN> connect catalog rman/rman@rcvcat (in host 1)
    RMAN> connect target sys/manager@prod (in host 3)
    RMAN> backup incremental level 1 tag 'CLONE' for recover of copy with tag 'CLONE' database format '/backup/%u';
    3) Copy the newly created incrementals (in host 3) to the clone database site (host 2). Make sure the directory must be exactly same.
    $ rcp /backup/<incr_backup> /backup/
    -- rcp <the loc of a incremental in host 3> <the loc of a incremental in host 2>
    4) Apply incrementals to update the clone database. Make sure you provide the tag you specified.
    RMAN> connect catalog rman/rman@rcvcat
    RMAN> connect target sys/manager@clone
    RMAN> recover copy of database with tag 'CLONE';
    5) After update the clone database, then delete the incremental backups and uncatalog the image copies
    RMAN> delete backup tag 'CLONE';
    RMAN> change copy like '/oracle/oradata/CLONE/datafile/%' uncatalog;
    *** As you can see, you can clone a database using any methods. The key is you have to catalog the clone database when you refresh it. After finishing it, then uncatalog..

  • Database updates statistics maintenance plan issue.

    Hi team,
    We are configured one job through maintenance plan that job name is “database update statistics” and database size is 280 Gb, this job executing 13 to 15 hours but job was not finished  still it’s continually running.
    This same job I am running through below script it’s executing within 2 hours.
    Use database
    Go
    Exec sp_updatestats
    What is the main problem if this maintenance plan.
    Note: on this server no jobs and no traffic, only abc_update subpaln1 Job.

    Hello,
    Updating stats for whole database which is 280 G will always result in problem.It is better to run update statistics for tables and indexes which are changed frequently.
    Now to your question few points which sp_Updatestas list in BOL
    http://technet.microsoft.com/en-us/library/ms173804.aspx
    sp_updatestats updates statistics on disabled nonclustered indexes and does not update statistics on disabled clustered indexes.
    sp_updatestats updates only the statistics that require updating based on the rowmodctr information in the sys.sysindexes catalog view, thus avoiding unnecessary updates of statistics
    on unchanged rows.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Database Update Pending

    Hello Everyone,
    I've recently redistributed the workload for my installation of File Reporter 2.0 so that of the 60-something servers I am scanning, none of the scan workload happens on the engine server. This does seem to have improved the performance of the engine in generating scheduled reports. However, I am still having performance problems on the last phase of scanning -- the point at which the scan says "Database Update Pending". There are scans from the 15th still stuck in this phase (the last completed scans are from the 14th).
    I assume that this is because I am using the internal postgres database on the engine, and that all of the scans trying to check in (from the 15th to today) are causing the database to spin. Which is a pity, because I would have thought that a product like NFR would have some nice means of letting each scan to be processed by the database in batch. Or maybe they do, in which case the problem is that the database is just taking a long time for each individual dataset to be processed.
    Have any of you seen this? Any advice for kicking it along? My engine server is not underpowered -- it has a couple of processors and 12GB of RAM (I really should take that down to 6, actually ...) and right now the CPU shows as nearly idle -- the NFRENgine is using 2% and system idle is using the rest. I'd prefer not to move to an external DB (especially since utilization doesn't seem to be the issue) but I'm willing to try if a case can be made.
    Johnnie Odom
    School District of Escambia County

    Hi Johnnie,
    As Duncan already mentioned, the engine log will be interesting to look at what happens.
    NFR is able to spread the load for the agent-scan however these agents will send their scan info to the Engine where a separate process will import these into the central database. Unfortunately NFR only handles one import at a time so if you have a lot of scan data coming in it could be that it will take some time to get hem all imported.
    Ron

  • WLI 7.0 samples database setup problem

    I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
    1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
    - provided valid database properties for oracle. Completed successfully - config.xml
    for samples is updated.
    2. Ran RunSamples script - Gives database connect problems and database is not created.
    The user/pwd/machine name/SID are all correct.
    I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
    is "switchdb oracle"). This resets the database properties in config.xml to the defaults
    - so obviously this is causing the connection problem.
    Pls let me know what is going wrong here?
    Thanks

    Garf,
    You are correct in your analysis. When you run the 'RunSamples' script,
    it will call switchdb and this causes the 'defaults' to be set in
    config.xml. Running the wliconfig utility is the customer experience
    BEA would like to have with regard to setting up the database. However,
    the RunSamples script has not been updated to correctly reflect that the
    customer would have already performed this step. When RunSamples calls
    switchdb, it is getting the defaults from the following location:
    <USER_DEFINED_DOMAIN>/dbInfo/<DATABASE>/setDBVars and setDBVarsExt files
    So for example, if you accepted the default user directory and your
    BEA_HOME is C:/bea and you were using the EAI Domain template calling
    your domain eaidomain and your are using Oracle, you should update the
    following files:
    C:\bea\user_projects\eaidomain\dbInfo\oracle\setDBVars.cmd and
    setDBVarsExt.cmd
    Edit these files to reflect your DB connection properties.
    When RunSamples calls switchdb, these properties will be used to update
    the wliPool in config.xml. I hope this helps and sorry for the
    inconvenience.
    Cheers,
    Chris
    Garf wrote:
    I have just installed WL Platform 7.0. I want to run the WLI samples and did the following:
    1. Started "Integration Database Wizard" for WLI samples and performed "SwitchDB"
    - provided valid database properties for oracle. Completed successfully - config.xml
    for samples is updated.
    2. Ran RunSamples script - Gives database connect problems and database is not created.
    The user/pwd/machine name/SID are all correct.
    I observed that as part of "RunSamples", it again invokes "SwitchDB" (command I see
    is "switchdb oracle"). This resets the database properties in config.xml to the defaults
    - so obviously this is causing the connection problem.
    Pls let me know what is going wrong here?
    Thanks

  • NextnPrevious pages and database update

    Hi Folks,
    Am hoping someone can point me in the right direction on figuring this out...
    I have 120 individuals in the database with related fields. Instead of displaying 120 rows when I pull the data from the database, I've built Next/Previous pages for displaying them 30 to a page.
    Here's the thing: This is an admin section, pulling names and IDs and fields (text, radio buttons, dropdowns, etc.) for data entry, or rather, database update.
    So, after displaying 30 on the page you have a link on the bottom of the page to display the next 30. This page refreshes itself...
    Either I have to cache the update info from each page and put a submit button for updating on the last page or, submit each page (30 at a time) until each succeeding page is done, one at a time. See what I'm getting at? I think I'd rather be able to submit 30 at a time instead of trying to cache all the data as you move from page to page but am having a hard time trying to figure this out.
    I'm not sure what is best or just how to do the database insert/update since the Next/Previous CF code depends on the same page refreshing itself each time for the next pages.
    Also, the first page of this 'group of NextPrevious pages' is dependant on it's previous page of "select school", so that the first NextPrevious page (and following ones) displays the individuals from that particular school - 30 at a time.
    Can anyone point me in the right direction on this kind of database insert/update when used in conjunction with Next/Previous page links?
    Thanks!
    - ed

    Thank ya'll for the ideas...
    You know, before posting this I googled and googled and was surprised to find hardly anything addressing this. I would have thought it would be a fairly common way to perform edits on a large number of table rows - when you only want to display, say, 30 per page instead of 1200 records on one web page for admin edits.
    With Meensi's and Furnis' suggestions and, a bit more thought... I kept thinking... It's pretty much like a shopping cart - holding a variable(s) from page to page. I know there's many ways to do this but the problem here lies in the page refresh holding variables with each refresh.
    Seems logical to update All edits at one time - submit the form on the last page. I'm wondering, say as in the case you may have 1200 NextPrevious pages (!) - You'd want the user to do it in bits, page per page.
    Since a clicked link clears session variables... maybe make the page refresh link (Next Page) a submit button and, on refresh, submit just "this particular page variables" and at the same time, the refresh loads the Next Page variables - updating the database in increments and display the next batch to edit.(?)
    Does this make sense? I do want to make this a 'no-brainer' for the user - an admin section being most intuative is foremost to me...
    The following is (stripped down) code I'm using to run the NextPrevious pages. I think maybe if I add the database insert somewhere in the code at the top of the page, coming from a form submit button that refreshes the page at the same time - maybe this would be the way to do it.
    I'm not sure if there will be a problem wrapping the <form></form> around just the current variables on This Page. Maybe not. I think I may experiment with this, though...
    Thank for your input on this.
    Does seem like something like this, updates within NextPrevious pages would be a common practice and an easy fix doesn't it?
    - ed
    <!-- application with session variables and headersecure placed here -->
    <!-- Per above - Put code here for database insert - An "if this page comes from the submitted form on this page" -->
    <!-- The following is, more or less, ThisPage.cfm -->
    <!-- Start displaying with record 1 if not specified via url -->
    <CFPARAM name="start" default="1">
    <!-- Number of records to display on a page -->
    <CFPARAM name="disp" default="40">
    <CFSET SchoolNameDropdown_z=structNew() />
    <CFSET structAppend(#SchoolNameDropdown_z#, URL) />
    <CFSET structAppend(#SchoolNameDropdown_z#, Form) />
    <cfquery DATASOURCE="#application.dsn#" name="search">
    etcetera
    </cfquery>
    <CFSET end=Start + disp>
    <CFIF start + disp GREATER THAN data.RecordCount>
      <CFSET end=999>
    <CFELSE>
      <CFSET end=disp>
    </CFIF>
    <head>
    <link href="global.css" rel="stylesheet" type="text/css" />
    </head>
    <BODY>
    <html>
            <cfset bgcolor = background_table_color_1>
      <cfoutput query="search" startrow="#start#" maxrows="#end#">
       <cfif bgcolor eq background_table_color_2>
        <cfset bgcolor = background_table_color_1>
       <cfelse>
        <cfset bgcolor = background_table_color_2>
       </cfif>
          #TRIM(variable01)#
          #TRIM(variable02)#       
            <input type="radio" name="Consent" value="Yes" <cfif Consent IS "Yes">checked</cfif>> Yes
            <input type="radio" name="Consent" value="No"  <cfif Consent IS "No">checked</cfif>>No
            <input type="radio" name="Assent" value="Yes" <cfif Consent IS "Yes">checked</cfif>> Yes
            <input type="radio" name="Assent" value="No"  <cfif Assent IS "No">checked</cfif>>No
            </cfoutput>
    <CFOUTPUT>
    <!-- Display prev link -->
      <CFIF start NOT EQUAL 1>
      <CFIF start GTE disp>
        <CFSET prev=disp>
        <CFSET prevrec=start - disp>
      <CFELSE>
        <CFSET prev=start - 1>
        <CFSET prevrec=1>
      </CFIF>
      <a href="ThisPage.cfm?start=#prevrec#"><<< Previous #prev# </a>
      </cfif>
    <!-- Display next link -->
    <CFIF end LT data.RecordCount>
      <CFIF start + disp * 2 GTE data.RecordCount>
        <CFSET next=data.RecordCount - start - disp + 1>
      <CFELSE>
        <CFSET next=disp>
      </CFIF>   
        <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">Next #next# >>> </a>
      </cfif>
    </CFOUTPUT>
    </BODY>
    </HTML>
    <!-- end -->

Maybe you are looking for

  • Poblem with java.sql.Date while inserting to a table

    Hi All, I have a PostgreSQL database table which contains fields(columns ) of type date. I want to insert values to the table in the[b] �dd-MMM-YYYY� format using the prepared statement. My code is as follows java.text.DateFormat dateFormatter =new j

  • No "Copy All to Address Book" option in SIM menu, BlackBerry 8100

    Hi! I'm new here...so glad I found this forum! I have searched high and low but have not found a way to solve this problem. I've updated my device software, desktop manager, everything I can think of. I even went back into the Setup Wizard and select

  • Changes not being published

    I'm having trouble with my changes not being saved/published. I can choose to edit a page, click publish... it then shows the page (in contribute) with my changes. But, when I go to the actual website, the changes are not there... and when I go back

  • Uninstalling ITUNES and re-installing on another PC

    if I unstall my Itunes software from my laptop and reinstall it on my desktop, will I lose my library? including the songs I purchased from the Itunes store? any help would be appreciated DELL INSPIRON 1150   Windows XP  

  • Computer Name

    Why does my 2011 Mac Mini keep changing the computer name. It is driving me nuts.