Write Back to Database

Hi,
Is there any component available in market which I can use to write back to database? I looked into web service option but there is not clear (Step by step) instruction on how to use it. If some body used any workaround or component please let me know.
Thanks In Advance
Kumar

For the web services, it is good to create three methods:
deleteComment
getComment
insertComment
Example:
public void handleComment(String Dashboard_Cd, String Metric_Cd,
               Integer Comment_Id, String Network_Id, String comment, String User_id) {
          long begin = System.currentTimeMillis();
          SimpleDateFormat sf = new SimpleDateFormat("MMyyyy");
          java.util.Date d = new java.util.Date();
          String fiscalPeriod = sf.format(d);
          DatabaseManager dbm = new DatabaseManager();
//          try {
               if (Comment_Id.equals(0)) {
                    try {
                         if (dbm.init(DBConfig.getInstance().getConfig(),
                                   DatabaseManager.SECURITY_LEVEL.LEVEL_0)) {
                              StringBuffer sql = new StringBuffer();
                              sql.append("" + " INSERT INTO "
                                                  + Environment.getInstance().getDbPrefix()
                                                  + "_UTIL.TUM_DBD_COMMENTARY "
                                                  + "SELECT '" + Dashboard_Cd + "', '" + Metric_Cd +"', "
                                                  + "TMP.MAXID+SUM(1) OVER (ROWS UNBOUNDED PRECEDING) "
                                                  + ",'" + User_id + "' "
                                                  + ", " + fiscalPeriod
                                                  + ", Current_Date "
                                                  + ",'" + comment + "', USER,CAST(CURRENT_TIMESTAMP AS TIMESTAMP(6)) "
                                                  + ", 'Y'"
                                                  + "FROM (SELECT COALESCE(MAX(Comment_Id),0) AS MAXID "
                                                  + "FROM  "
                                                  + Environment.getInstance()
                                                            .getDbPrefix()
                                                  + "_UTIL.TUM_DBD_COMMENTARY) TMP");
//                              String sqlstr = sql.toString();
                              log.info(sql.toString());
                              JPreparedStatement jp = new JPreparedStatement(sql
                                        .toString());
                              jp.setBeanClass(Commentary.class);     
                              try {
                                   DBResult rs = dbm.doQuery(jp, DBConfig
                                             .getInstance().getContext(Network_Id));
                                   if (!rs.getStatus()) {
                                        for (SQLException e : rs.exceptionInfo()) {
                                             log.error("", e);
                              } catch (Exception e) {
                                   log.error("", e);
                    }finally {                         dbm.cleanUp();
Webservice Connection:
From the Manage Connections, select the add and select Web Service Connection.
You will want to import the url for your ear file, where you will want to select the method you created. 
I do not have a blog or forum at this time, though I will see if I can create a walkthrough video within the week.

Similar Messages

  • ORacle 10g - Display database data, edit it and write back to database

    Hi!
    I would like to find an application which allows me to read data from a database (object-relational database schema), display it visually, make it editable and offer me the opportunity to write changed data to the database.
    Does anyone have experience with Visio or some other tool?
    Timo

    Hi,
    thank you for your replies!
    I am not sure if the mentioned applications really are what I am looking for. It seems to me that they are developing tools rather than presentation and editing tools. I don't want to present or change the schema but the data of the database. The objects in my database are business processes and the user should be able to get all the information he/she desires about them, be able to edit them and also to create new processes. It's more like a GUI for end users.
    Timo

  • Error while Write Back

    Hi Frienz,
    Below is the xml file ..
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="writeBack" table="Messages">
    <WebMessage name="Correction_FPP">
    <XML>
    <writeBack connectionPool="RecoPool">
    <insert>INSERT into DAILY.REVRECAT (IP,PASSTHRU,REIMB ,DEF_REV_EAR_MTH, DEF_REV_CUR_MTH, INTERVERT, OTHERS, RATE_FACT, SAP_LOSS_GAIN) values (@{c10},@{c11},@{c12},@{c13},@{c14},@{c15},@{c06},@{c19})</insert>
    <update> </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    The write Back button is enabled but ..wen i execute ...i get the error as ..
    *********************************************************************************************An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL RecoPool
    Let me knwo why is the issue and how can it be solved.
    Appreciate ur help..
    Many Thanks,
    Veena A
    Edited by: Veena A on Jan 18, 2009 11:38 PM

    Hi Veena,
    1. Login into Presentation URL http://<hostname>:9704/analytics.
    2. Click on "Settings", a popup will come up
    3. in popup window Click on "Manage Privileges"
    4. Goto end you will find "Write Back"-->"Write Back to Database" infront of this if you find "*(not permitted)*"
    Then no previlages.
    Regards,
    Somu

  • Crystal Reports Web Elements - database write back question

    Hi,
    I have a question about Web Elements. In description of them on SAP site it says they can provide "write-backs to the database". This is something I would really like to see. I have a scenario:
    User sees a long report and sometimes she needs to add a quick note that should be saved into the database. That note can be entered into WETextArea I suppose and WESubmit button click can be an event  trigger for such a write back.
    I would like to see example of such functionality on Crystal Report rpt file.
    Please advise if anybody knows, I would highly appreciate your assistance.
    Regards, Grettir

    hello,
    webelements can be used for the interface to database writebacks...they don't do the writebacks themselves but create the interface to make it easier for an end user to add annotations etc...these values are then passed to a second report or a subreport. using the default prompting interface makes this quite difficult.
    here's where the database writebacks are done...since version 9 of crystal reports there have been command objects. command objects have the ability to use any database syntax that is compliant with the database connection. i.e. if the syntax can go through the odbc layer then you can do this in a command in crystal reports.
    commands will honour database securities so you don't have to worry about someone dropping a table if rights have been properly assigned. a word of caution there to ensure that database rights have been done properly as you don't want all end users to have the ability to write a report that can do database updates.
    commands are also database specific so you would have to check your database online help to see what syntax would be appropriate.
    the workflow would be to have 2 reports, one that had the webelements user interface and one that did the writeback. this user interface report would have the text object and submit button and using open document syntax, the values would be passed to the 2nd report that had the command object. the command object would have a prompt that would take the values from the open document url and then use the values in the write back.
    for example,
    1) the user interface report has one text object called "t1" and one submit button.
    2) the target command object report has a prompt called "t1".
    3) the target report command object has syntax like
    INSERT INTO yourtestable
    VALUES    ('{?t1}')
    SELECT     1
    4) yourtesttable in this case has only one text field
    5) the "SELECT 1" at the end of the command ensures that a dummy value is returned after running the update...to avoid a database error
    6) this syntax would be for sql server
    this is of course a very simplified example.
    if you are at tech ed phoenix, please drop by the business objects test drive area & i will be there. i can show you a bunch of different webelements examples and write back reports etc. until you become quite bored
    i hope that this helps,
    jamie

  • Write Back - Database update logs user out

    Hi All,
    I have implemented write back functionality on a single varchar field in one of my reports. Everything appears to be setup correctly (permissions are set at the presentation and rpd layer to allow for the write back and the write back template appears to have no issues). When a user logs in they are able to see the editable fields and the Update button is enabled. When a user then changes a field value and hits the update button, everything again appears to complete without any error and checking the database side the update shows up correctly.
    The issue is that after the Update button is pressed and the database changes are committed successfully, the users session keeps getting logged out. Once they hit the update button and then try to click anywhere else within OBIEE, they are automatically hit with the logged out page and need to log back in. This happens everytime and the changes do take to the database.
    Has anyone ever seen this before? I have tried shutting down all windows and clearing browser cache and then coming in fresh but keeps happening.
    Thanks,
    k

    Hi,
    though this thread is closed i just want to put some note.
    try playing with the Isolation Levels.
    If you used Toad, you might have come across a functionality when your logging off...which is to commit your transactions before logging off.
    Envisioning this functionality i presume there should be some db level property that might be causing this in that particular environment.
    thanks
    -nag
    http://www.obinotes.com

  • 10g Write back works for some users, not others

    Dear Gurus,
    I have a strange problem with the Write Back in my system. We use Write-back pretty extensively and have maybe 10-20 separate reports, updating a number of tables.
    We have been using this system for almost a year with no problems - Myself (logging in as Administrator) and a member of the Business team, logging in as herself (a member of the Presentation Server Administrator Group).
    We now require two more Business power-users to use our Write-back reports. I have added them to the Presentation Server Administrator group. However, when they try to enter values into ANY of the write-back reports, they get the following error;
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists...
    *State: HY000. Code 10058 [NQODBC]... A general error has occurred. [nQSERROR 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute (HY000)*
    SQL issued: EXECUTE PHYSICAL CONNECTION POOL "GL Oracle Data Warehouse Connection Pool"
    I do not understand why the write back is working without error for my own user, the Admin user and a member of the business team who is in the Presentation Server Administrator group, but not for two new additions to that group.
    I have checked that the Presentation Server Admin group is granted on the "Enable/Manage Write Back" privilege and on the Execute SQL privilege.
    Any ideas what else I could check?
    Thanks,
    A.

    Hey Amith,
    Thanks for your quick reply! Unfortunately, this doesn't seem to be the case. The system is pretty much wide open, apart from the Write pack privilege, which only the Presentation Server Administrator group has access to.
    I'm having another of my Presentation Server Administrators who has been in the group forever try to use the write back.
    There's no specific connection pool or database level permissions for write back, is there? And there's no specific permissions which need to be set on the xml template files?
    Thanks,
    A.

  • From database to excel and back to database from excel - how?

    Environment: db 8,10 server (HPUX), IAS (SUSE), forms6i,10+report6i,10
    On principle there is no problem to get data from database to excel but there is the problem how to get data from excel back to database. I don't have intention to use APEX. The goal is to move the cursor to certain row in excel sheet and depends of data in this row call Oracle form in query only mode. Here is the solution to write URL into the excel cell but still exists the problem how to reduce number of session because each call of the form open the new session what I don't like to do.
    Thanks for purposes!
    m.

    Inolau, I'd like to open form between watching excel sheet depends of data in excel. For example:
    Cells:
    A B C
    1. 1 2 3
    2. 4 5 6
    When I put the cursor on B:2 cell I'd like to open a form. After this I'd like to put the cursor on cell C:1 and I'd like to open the same form again. All in one session.

  • Can multiple threads write to the database?

    I am a little confused from the statement in the documentation: "Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time."
    1. Can multiple threads write to the "Simple Data Store"?
    2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    #include "stdafx.h"
    #include <stdio.h>
    #include <windows.h>
    #include <db.h>
    static DB *db = NULL;
    static DB_ENV *dbEnv = NULL;
    DWORD WINAPI th_write(LPVOID lpParam)
    DBT key, data;
    char key_buff[32], data_buff[32];
    DWORD i;
    printf("thread(%s) - start\n", lpParam);
    for (i = 0; i < 200; ++i)
    memset(&key, 0, sizeof(key));
    memset(&data, 0, sizeof(data));
    sprintf(key_buff, "K:%s", lpParam);
    sprintf(data_buff, "D:%s:%8d", lpParam, i);
    key.data = key_buff;
    key.size = strlen(key_buff);
    data.data = data_buff;
    data.size = strlen(data_buff);
    db->put(db, NULL, &key, &data, 0);
    Sleep(5);
    printf("thread(%s) - End\n", lpParam);
    return 0;
    int main()
    db_env_create(&dbEnv, 0);
    dbEnv->open(dbEnv, NULL, DB_CREATE | DB_INIT_MPOOL | DB_THREAD, 0);
    db_create(&db, dbEnv, 0);
    db->open(db, NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0);
    CreateThread(NULL, 0, th_write, "A", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "C", 0, 0);
    th_write("C");
    Sleep(2000);
    }

    Here some clarification about BDB Lock and Multi threads behavior
    Question 1. Can multiple threads write to the "Simple Data Store"?
    Answer 1.
    Please Refer to http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    A Data Store (DS) set up
    (so not using an environment or using one, but without any of the DB_INIT_LOCK, DB_INIT_TXN, DB_INIT_LOG environment regions related flags specified
    each corresponding to the appropriate subsystem, locking, transaction, logging)
    will not guard against data corruption due to accessing the same database page and overwriting the same records, corrupting the internal structure of the database etc.
    (note that in the case of the Btree, Hash and Recno access methods we lock at the database page level, only for the Queue access method we lock at record level)
    So,
    if You want to have multiple threads in the application writing concurrently or in parallel to the same database You need to use locking (and properly handle any potential deadlocks),
    otherwise You risk corrupting the data itself or the database (its internal structure).
    Of course , If You serialize at the application level the access to the database, so that no more one threads writes to the database at a time, there will be no need for locking.
    But obviously this is likely not the behavior You want.
    Hence, You need to use either a CDS (Concurrent Data Store) or TDS (Transactional Data Store) set up.
    See the table comparing the various set ups, here: http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    Berkeley DB Data Store
    The Berkeley DB Data Store product is an embeddable, high-performance data store. This product supports multiple concurrent threads of control, including multiple processes and multiple threads of control within a process. However, Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time. The Berkeley DB Data Store is intended for use in read-only applications or applications which can guarantee no more than one thread of control updates the database at a time.
    Berkeley DB Concurrent Data Store
    The Berkeley DB Concurrent Data Store product adds multiple-reader, single writer capabilities to the Berkeley DB Data Store product. This product provides built-in concurrency and locking feature. Berkeley DB Concurrent Data Store is intended for applications that need support for concurrent updates to a database that is largely used for reading.
    Berkeley DB Transactional Data Store
    The Berkeley DB Transactional Data Store product adds support for transactions and database recovery. Berkeley DB Transactional Data Store is intended for applications that require industrial-strength database services, including excellent performance under high-concurrency workloads of read and write operations, the ability to commit or roll back multiple changes to the database at a single instant, and the guarantee that in the event of a catastrophic system or hardware failure, all committed database changes are preserved.
    So, clearly DS is not a solution for this case, where multiple threads need to write simultaneously to the database.
    CDS (Concurrent Data Store) provides locking features, but only for multiple-reader/single-writer scenarios. You use CDS when you specify the DB_INIT_CDB flag when opening the BDB environment: http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envopen.html#envopen_DB_INIT_CDB
    TDS (Transactional Data Store) provides locking features, adds complete ACID support for transactions and offers recoverability guarantees. You use TDS when you specify the DB_INIT_TXN and DB_INIT_LOG flags when opening the environment. To have locking support, you would need to also specify the DB_INIT_LOCK flag.
    Now, since the requirement is to have multiple writers (multi-threaded writes to the database),
    then TDS would be the way to go (CDS is useful only in single-writer scenarios, when there are no needs for recoverability).
    To Summarize
    The best way to have an understanding of what set up is needed, it is to answer the following questions:
    - What is the data access scenario? Is it multiple writer threads? Will the writers access the database simultaneously?
    - Are recoverability/data durability, atomicity of operations and data isolation important for the application? http://docs.oracle.com/cd/E17076_02/html/programmer_reference/transapp_why.html
    If the answers are yes, then TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    Question 2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    Answer 2.
    Definitely yes, You can see data loss and/or data corruption.
    You can check the behavior of your testcase in the following way
    1. Run your testcase
    2.After the program exits
    run db_verify to verify the database (db_verify -o test.db).
    You will likely see db_verify complaining, unless the thread scheduler on Windows weirdly starts each thread one after the other,
    IOW no two or ore threads write to the database at the same time -- kind of serializing the writes
    Question 3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    Answer 3.
    In Your case the TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    doing this You have proper deadlock handling in place and proper transaction usage
    so
    You are protected against potential data corruption/data loss.
    see http://docs.oracle.com/cd/E17076_02/html/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf
    Multi-threaded and Multi-process Applications
    DB is designed to support multi-threaded and multi-process applications, but their usage
    means you must pay careful attention to issues of concurrency. Transactions help your
    application's concurrency by providing various levels of isolation for your threads of control. In
    addition, DB provides mechanisms that allow you to detect and respond to deadlocks.
    Isolation means that database modifications made by one transaction will not normally be
    seen by readers from another transaction until the first commits its changes. Different threads
    use different transaction handles, so this mechanism is normally used to provide isolation
    between database operations performed by different threads.
    Note that DB supports different isolation levels. For example, you can configure your
    application to see uncommitted reads, which means that one transaction can see data that
    has been modified but not yet committed by another transaction. Doing this might mean
    your transaction reads data "dirtied" by another transaction, but which subsequently might
    change before that other transaction commits its changes. On the other hand, lowering your
    isolation requirements means that your application can experience improved throughput due
    to reduced lock contention.
    For more information on concurrency, on managing isolation levels, and on deadlock
    detection, see Concurrency (page 32).

  • Getting error during write back operation in OBIEE

    Hi Experts
    I have implemented the Write back operation in OBIEE . My xml code is
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="NEW">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <insert> </insert>
    <update>UPDATE ACCT_DIM SET HIPC_FLAG='@{c5}' WHERE ACCT_SR_KEY=@{c0} </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    But i am getting error when i will click on Write Back Button.
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL "Connection Pool"
    Please suggest me how to remove this error.
    Thanks In advance
    Rehards
    Sunil

    Hi experts
    This is my xml code but i am not able to update records in my database. is there any changes required in this xml.
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="new">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <insert> </insert>
    <update>UPDATE ACCT_DIM SET HIPC_FLAG='@{c4}' WHERE ACCT_SR_KEY=@{c0} </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    My table name in database is ACCT_DIM and i am updating HIPC_FLAG in my table.
    I am getting error:
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. NQODBC SQL_STATE: HY000 nQSError: 10058 A general error has occurred. nQSError: 27024 The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL "Connection Pool"
    Thanks in advance
    Regards
    Sunil

  • Update only the row in DB where the cursor are positioned using Write Back

    Hello,
    I need to have the possibility to create/change values (insert or update data back into the database), dynamically or by typing, in some columns of the physical DB that are mapped in a report request, and that new or changed values could be used as a filter columns in another report request.
    So, I have created a new report request in a Subject Area where a certain column of the request result could be editable to make possible change the present value and then write it back in the physical DB.
    I have implemented for the column name ‘MOV_VALUE’ the value interaction type format Write Back, and every time I changed any value on this column it updates all rows with this same value from the table ‘MOVEMENTS’.
    See below the Template file used in the Write Back table properties:
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name= "UpdateMovementData">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <insert> </insert>
    <update> UPDATE MOVEMENTS SET MOV_VALUE=@{c4} </update>
    <!-- <postUpdate>COMMIT</postUpdate> -->
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Is there any possibility to only update the record from where it is the cursor positioned by using the Write Back in the Answers report?
    Is necessary to create any condition to the where clause for the update statement? Which conditions?
    Thanks in advance.
    Regards,
    Pedro Resende

    You might try posting to a BPM forum. BPM is a layered product that happens to use WL JMS, but I think most of the folks on this forum aren't familiar with BPM.
    Tom

  • Write Back Capability in Essbase

    Dear All,
    I read some where BSO has a direct write-back capability which is not possible in ASO, correct me if i'm wrong. Now my doubt is What is write back capability.

    'Write-back' refers to the ability of end-users to send values directly to the cube from a combined read / write interface such as the Essbase Excel Add-In, Smart View, Dodeca, Planning etc. A user can look at a value retrieved from the cube, decide for whatever reason that he or she wishes to change it, enter a new value and 'write it back'.
    This is in contrast to data loaded (usually as part of a batch process) from an external system.
    ASO is one of the two data storage mechanisms available in Essbase - it stands for 'Aggregate Storage Option'. As John said, write back to ASO cubes is only possible at 'level zero', and this feature was not introduced until version 9.3.1. If you aren't clear what 'level zero' means, I suggest reading this section of the Database Administrator's Guide: http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/frameset.htm?dinconc.html

  • Write back - how OBIEE decides  insert or update action ?

    Hello
    I have a question regarding write-back.
    I have both an insert and update statement in my template file.
    I want to give the users ability to insert new rows and update existing ones.
    I am able to do both, but sometimes the insert/update behavior is not consistent. That is, instead of updating the record, it creates a new row itself in the database (and sometimes the reverse also is true).
    Anyone has ideas on how OBIEE decides whether it is an insert or update action?
    thanks in advance

    Hi,
    I have implemented writeback in Obiee 10g version
    It's working fine
    Please refer my correct code
    3)      Add XML File to this path  C:\OracleBI\web\msgdb\customMessages\WriteBack.xml  and
    C:\OracleBIData\web\msgdb\WriteBack .xml   path.
    File Name: WriteBack.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WriteBack">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <update>UPDATE db_summary SET comments='@{c1}' WHERE location='@{c2}'</update>
    <insert>INSERT INTO db_summary {comments} VALUES '@{c1}' </insert>
    </writeBack>
    </XML>
    </WebMessage>
    <WebMessage name="WriteBackNew">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <update>UPDATE report_comments SET comments='@{c1}' WHERE username='@{c0}'</update>
    <insert>INSERT INTO report_comments {comments} VALUES ('@{c1}') </insert>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Note: It’s all are case sensitive and red lined letters are give as above. After that restart all the OBIEE Server (Java Host, OC4J, BI Server etc.)
    Note1: As Button Text in Presentation Layer :system="WriteBack"  and
    As Template Name in Presentation Layer : <WebMessage name="WriteBackNew">
    For more refer my blog link
    http://obieeelegant.blogspot.com/2010/12/write-back-steps-1-go-to-repository.html
    Thanks
    Deva

  • Obiee 10g write back error while insertion

    Hi,
    Im getting an error while trying to write back a column to oracle database.
    Error details
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL orcl
    Xml issued
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WriteBack">
    <XML>
    <writeBack connectionPool="orcl">
    <insert> INSERT INTO writebackasim(name)values (@{c1}) </insert>
    <update> </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Help me please...

    now it is updating the value...But still error message is coming
    and i have changed the code to insert..BUt now getting the error message and not inserting the value.. can you please debug this.
    ?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WriteBack">
    <XML>
    <writeBack connectionPool="orcl">
    <insert>insert into writebackasim(id,name)values(@{c0},'@{c1}')</insert>
    <update>select null from dual</update>
    <postUpdate>COMMIT</postUpdate>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    error message
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL orcl COMMIT
    -

  • Enable write back

    Hi Experts,
    I enable write back, I used Venkats blog post:
    I am able to update my database successfully but i am getting the below error message
    Error:
    An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL Sales COMMIT
    Please suggest..
    Regards
    Sai

    Hi..
    Referring to Error:Unable to read the Writeback template the XML would be .. in the following way.. don't use.. COMMIT statement
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WriteBack">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <insert> INSERT INTO FACT (PRICE,PRODUCT_KEY,REGION_KEY,SALE_UNIT,TIMEKEY,SALES_QUOTA)
    values (@{c7},@{c8},@{c9},@{c10},@{c11},@{c5} ) </insert>
    <update> </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    The <writeBack> tag is written with a lower case "w".
    The "connetionPool" needs an upper case "P".
    Edited by: Kishore Guggilla on Dec 17, 2008 7:45 PM

  • Write Back in 11G

    Hi,
    How to implement write back option in 11G.
    Regards
    sathya

    Hi,
    Please check the below steps and refer the below links.
    http://satyaobieesolutions.blogspot.in/2012/06/obiee-10g11g-writeback-capabilities.html
    http://satyaobieesolutions.blogspot.in/2012/06/excel-data-source-writeback-in-obiee.html
    1. Problem your XMl Script
    2. If null value not present in your columns in your table in database.The ; problem has occured.
    please check below steps.
    1. Are you using OCI or ODBC in your connection pool? Try it with OCI Call Interface 11g.
    2.Remove the commit tag from the XML file.
    <postUpdate>COMMIT</postUpdate>
    =============================================================================================================
    This xml file working for me.
    Insert--
    A couple of small adjustments got your XML to work here:
    <?xml version="1.0"; encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1";>
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="WriteBack">
    <XML>
    <writeBack connectionPool="Connection Pool">
    <insert> INSERT INTO FACT (PRICE,PRODUCT_KEY,REGION_KEY,SALE_UNIT,TIMEKEY,SALES_QUOTA)
    values (@{c7},@{c8},@{c9},@{c10},@{c11},@{c5} ) </insert>
    <update> </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    The <writeBack> tag is written with a lower case "w".
    The "connetionPool" needs an upper case "P".
    Update--
    I think that you have to specify also an SQL statement for the update tag, for example:
    <?xml version="1.0"; encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1";>
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="pmet_update">
    <XML>
    <writeBack connectionPool="PMTCOG">
    <insert> select null from dual</insert>
    <update> UPDATE XREF_PMET_URL SET URL= '@{c1}' WHERE API='@{c0}'</update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    The witeback wants for both the tags (<insert></insert> and <update></update>) an SQL Statement.
    Hope this help's
    Thanks
    Satya

Maybe you are looking for

  • In which Data Dictionary View I can find ...

    Hello, I will do a Overview over all of our Full Backups. I am searching in the Data Dictionary Views but I colud not found the right information. I could find a nice overview over the last redo log archive etc but no overview over the full backups?!

  • Error Message in version 7.1.0.33

    Greetings, My desktop software automatically upgraded to version 7.1.0.33, but I'm getting the same error message that I was getting in version 7.0.0. I was hoping that the upgrade would fix the error. Shane. Z10 STL100-3 (version 10.3.1.2708) LTE Pl

  • Publishing a msaccess database

    I created an Access 2013 database and when trying to publish it requested for a url which I did write but did not publish instead asked for a sharepoint ..... is it possible to publish access database using any other url other than sharepoint.

  • How to make internal speaker of a computer system on with a java program

    hi experts........ i got a requirement that i have to just make a sound when i get some exception. is this possible to make internal speaker on from a java program? if so please tell me the solution thanks Naresh G.

  • CS 5.5 production premium and Camera RAW

    hello i just bought adobe creative suite 5.5 production premium when i opened the box i saw 3 stickers of Serial numbers , one for Color Finesse , PPro/AE CS4 32bit and Production Premium I put Production Premium SN when the installer lunched and i t