Delete a row from a data object using an AQ-driven EMS

Hello, technetwork.
I need to show the contents of a table that changes frequently (inserts, updates and deletes) at ORDBMS 10g in my BAM dashboard.
What i have done is:
- Create two different queue tables, queues.
- Create two triggers: one for "AFTER insert or UPDATE" and the other for "BEFORE DELETE".
- Create two EMS, one configured to Upsert operations and the other to Delete.
- The Upsert EMS works, but the Delete EMS does not.
- Both EMS Metrics say that they work fine and commit the messages i send to the ADC.
- Testing showed records are populated and updated in the ADC but never deleted.
There is a detailed user case for "Creating an EMS Against Oracle Streams AQ JMS Provider" in the Fusion Midleware Developer's Guide for SOA Suite, but it deals only with Upserts. I am using the last versions of SOA suite and Weblogic. The official support has no information either.
I hope writing a web service client isn't the only way to delete a row from a data object. Am i missing something? Any help will be much appreciated.
My EMS config:
Initial Context Factory: weblogic.jndi.WLInitialContextFactory.
JNDI Service Provider URL: t3://<spam>:80.
Topic/Queue Connection Factory Name: jms/BAMAQTopicCF.
Topic/Queue Name: jms/ProdGlobalBAMD_flx.
JNDI Username: .
JNDI Password: .
JMS Message Type: TextMessage.
Durable Subscriber Name (Optional): BAM_ProdGlobalBAMD.
Message Selector (Optional): .
Data Object Name: /bam/ProdGlobalBAM_flx.
Operation: Delete.
Batching: No.
Transaction: No.
Start when BAM Server starts: No.
JMS Username (Optional): .
JMS Password (Optional): .
XML Formatting
Pre-Processing
Message Specification
Message Element Name: row
Column Value
Element Tag
Attribute
Source to Data Object Field Mapping
Key Tag name Data Object Field
. BARCODE. BarCode.
Added my EMS config

Ram_J2EE_JSF wrote:
How to accomplish this using JavaScript?Using Javascript? Well, you know, Javascript runs at the client side and intercepts on the HTML DOM tree only. The JSF code is completely irrelevant. Open your JSF page in your favourite webbrowser and view the generated HTML source. Finally just base your Javascript function on it.

Similar Messages

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

  • How to delete the row from the ADF table using popup box

    Hi,
    I have one requirement like need to delete a record from the table, but that time need to show one popup window for confirmation of the deletion. I am using Delete buttom from the vo operations. I am able to delete the row with out popup but when i used the popup that time deletion is not happening.
    Can any one help me in this.
    Regards,

    Issue was resolved.

  • Deleting a row from a JTable using a custom TableModel

    Before I waste any of your time I would like to go ahead and just say that I have searched through the forum using "delete row from Jtable" as the search keywords and while I have found very closely related issues, they have not solved my problem. I have found code postings by carmickr and his arguments as to why we should use DefaultTableModel instead of having created our own custom TableModel, and while I do agree, I just am not quite confident enough in applying it to my scenario. See I am reading from a file a bunch of Contractor objects and I am stuffing it into an arraylist which I am using in the following code posting to populate my TableModel which the JTable object in the gui then uses.
    My problem is that everything works except when I delete and when I delete I understand that the index is changing because I just removed a row from the arraylist object. Suppose I have 33 rows displaying in the GUI. Now after I delete say row #23, the delete function works and dutifuly the row disappears from the table, but if I try to delete a row say...the last row, it does not work and throws me an IndexOutOfBoundsException which totally makes sense. My question is how do I go about fixing it? Do I have to do something with the setRowCount method?
    Any help is appreciated.
    Cheers,
    Surya
    * ContractorTableModel.java
    * Created on January 12, 2006, 11:59 PM
    package code.suncertify.gui;
    import java.util.ArrayList;
    import java.util.logging.Logger;
    import javax.swing.table.AbstractTableModel;
    import code.suncertify.db.Contractor;
    * @author Surya De
    * @version 1.0
    public class ContractorTableModel extends AbstractTableModel {
         * The Logger instance. All log messages from this class are routed through
         * this member. The Logger namespace is <code>sampleproject.gui</code>.
        private Logger log = Logger.getLogger("code.gui");
         * An array of <code>String</code> objects representing the table headers.
        private String [] headerNames = {"Record Number", "Contractor Name",
        "Location", "Specialties","Size", "Rate",
        "Owner"};
         * Holds all Contractor instances displayed in the main table.
        private ArrayList <Object> contractorRecords = new ArrayList<Object>(5);
         * Returns the column count of the table.
         * @return An integer indicating the number or columns in the table.
        public int getColumnCount() {
            return this.headerNames.length;
         * Returns the number of rows in the table.
         * @return An integer indicating the number of rows in the table.
        public int getRowCount() {
            return this.contractorRecords.size();
         * Gets a value from a specified index in the table.
         * @param row An integer representing the row index.
         * @param column An integer representing the column index.
         * @return The object located at the specified row and column.
        public Object getValueAt(int row, int column) {
            Object [] temp = (Object[]) this.contractorRecords.get(row);
            return temp[column];
         * Sets the cell value at a specified index.
         * @param obj The object that is placed in the table cell.
         * @param row The row index.
         * @param column The column index.
        public void setValueAt(Object obj, int row, int column) {
            Object [] temp = (Object []) this.contractorRecords.get(row);
            temp [column] = obj;
         * Returns the name of a column at a given column index.
         * @param column The specified column index.
         * @return A String containing the column name.
        public String getColumnName(int column) {
            return headerNames[column];
         * Given a row and column index, indicates if a table cell can be edited.
         * @param row Specified row index.
         * @param column Specified column index.
         * @return A boolean indicating if a cell is editable.
        public boolean isCellEditable(int row, int column) {
            return false;
         * Adds a row of Contractor data to the table.
         * @param specialty
         * @param recNo The record number of the row in question.
         * @param name The name of the contractor.
         * @param location Where the contractor is located
         * @param size Number of workers for the contractor
         * @param rate The contractor specific charge rate
         * @param owner Name of owner
        public void addContractorRecord(int recNo, String name,
                String location, String specialty,
                int size, float rate, String owner) {
            Object [] temp = {new Integer(recNo), name,
            location, specialty, new Integer(size),
            new Float(rate), owner};
            this.contractorRecords.add(temp);
            fireTableDataChanged();
         * Adds a Contractor object to the table.
         * @param contractor The Contractor object to add to the table.
        public void addContractorRecord(Contractor contractor) {
            Object [] temp = {new Integer(contractor.getRecordNumber()),
            contractor.getName(), contractor.getLocation(),
            contractor.getSpecialties(), new Integer(contractor.getSize()),
            new Float(contractor.getRate()), contractor.getCustomerID()};
            this.contractorRecords.add(temp);
            fireTableDataChanged();
         * Deletes a row of Contractor data to the table.
         * @FIXME Now that I deleted a row then I will have to reset the internal structure so that I can delete again
         * @param recNo The record number of the row in question.
        public void deleteContractorRecord(int recNo) {
            contractorRecords.remove(recNo - 1);
            fireTableRowsDeleted(recNo -1, recNo - 1);
    }

    Wow that was a very quick response. Thanks camickr. I am only trying to delete a single row. I do not know how to go about posting a test program for the code I have posted above because honestly the gui itself is 800 lines of code, and then the file reading class is quite funky in itself. I can maybe email you the entire Netbeans project including code so if you are using Netbeans 5 RC2 you can run the code and see for yourself, but that would not be considerate of me.
    See I am trying to delete any row at any time...but only one at a time not multiple rows...so if a user decides to delete row 23 and then tries to delete the last row which happens to be row 33 in my case, my setup should be smart enough to still allow to delete the row.

  • How To Delete a row from view object

    Hi
    I have a table whose data is populated based on the view object... and for each row i have a delete icon...
    when i press on this delete icon i want to delete that particular row from the view object only..but not from the data
    base..please help me in this issue
    Thanks

    Hi,
    as per krishna priya says u can delete .
    -----1st one thing let me know vo is eo based .???.
    If not here is the sample code to delete a row not from the data base.:
    public void Deleterow(OAPageContext pageContext, OAWebBean webBean,String prjid)
    int idtodelete;
    int fetchedrowcount;
    Number prjojectid;
    RowSetIterator deleteIter;
    prjidtodelete=Integer.parseInt(prjid);
    OADBTransaction tr = getOADBTransaction();
    ProjectsVORowImpl row=null;
    ProjectsVOImpl vo= getProjectsVO1();
    fetchedrowcount=vo.getRowCount();
    deleteIter = vo.createRowSetIterator("deleteIter");
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    row= (ProjectsVORowImpl)deleteIter.getRowAtRangeIndex(i);
    prjojectid=(Number)row.getAttribute("ProjectId");
    if (prjojectid.compareTo(prjidtodelete)==0)
    row.remove();
    break;
    deleteIter.closeRowSetIterator();
    Regards
    Meher Irk
    Edited by: Meher Irk on Nov 2, 2010 12:42 AM

  • Deleting a row from a table using jsp

    Given a table in a jsp, can an user click on a row of that table and retrieve the information so that the program can delete a record from a database table?
    most of the tables that I have seen are static, the user cannot interact with them(specially when the user wants to delete several records from a database table).
    Can anyone suggests a good book or way of deleting a row from table using jsp.

    eg use a column in the table that has a radio button or check box,
    on submit, get all the rows that are checked, using the row as an index into your db store, get the key and use the key to issue the sql delete command.

  • Best practice for deleting multiple rows from a table , using creator

    Hi
    Thank you for reading my post.
    what is best practive for deleting multiple rows from a table using rowSet ?
    for example how i can execute something like
    delete from table1 where field1= ? and field2 =?
    Thank you

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Delete a Row from a Nested Data Table

    Hi... Good day...
    I have a dataTable nested within another DataTable.
    I want to delete a Row from the nested DataTable on clicking a remove Button at the Last column of the Nested DataTable, Jus in the browser.
    How to accomplish this using JavaScript?
    Here is my Code Snippet..
    <h:dataTable value="#{myListBean.rpts}" binding="#{myListBean.parent}" var="item" headerClass ="header" rowClasses = "whiteRow,grayRow" cellspacing="0" cellpadding="4" border = "0"  id = "dataTable">
    <h:column>
         <h:graphicImage id="expand" value="static/images/plus.gif" onclick="showNested(this);" rendered="#{item.schedImgurl=='static/images/scheduled.gif'}"/>
          <div id="#{item.rptId}">
          <h:dataTable id="orderLines" binding="#{myListBean.child}"  value="#{item.scheduleList}" var="schedItem" style="display: none;">
          <h:column>
           <h:outputText value="#{schedItem.scheduleID}" style="display:none;" />
             <f:facet name="header" >
                   <h:outputText value="Scheduled Criteria"/>
              </f:facet>
             <h:outputText value="#{schedItem.scheduleCriteriaName}" />
             <span onMouseOver="JavaScript:showScheduleTooltip(event,'#{schedItem.toolTipCriteraia}')" onMouseOut="JavaScript:hideTooltip()">...</span>
          </h:column>
            <h:column>
           <f:facet name="header" >
          <h:outputText value="Frequency"/>
          </f:facet>
           <h:outputText value="#{schedItem.scheduleFrequency}" />
          </h:column>
          <h:column>
           <f:facet name="header" >
           <h:outputText value="On"/>
           </f:facet>
           <h:outputText value="#{schedItem.scheduleStartDate}" />
          </h:column>
          <h:column>
            <input type="button" value="Remove"onclick=" Remove();"/>
          </h:column>
    </h:dataTable>
    </div>
    </h:column>
    </h:dataTable>Whatz that I need to do inside the Remove() JavaScript Function ?

    Ram_J2EE_JSF wrote:
    How to accomplish this using JavaScript?Using Javascript? Well, you know, Javascript runs at the client side and intercepts on the HTML DOM tree only. The JSF code is completely irrelevant. Open your JSF page in your favourite webbrowser and view the generated HTML source. Finally just base your Javascript function on it.

  • Use Preparedstatement to delete several rows from database

    Hello everyone,
    I am trying to delete multiple rows from database at one time using Preparedstatement.
    It works well when I tried in SQL directly,the sql query is as follows:
    delete from planners_offices where planner ='somename' and office in ( 'officeone', 'officetwo', 'officethree')
    I want to delete those 3 rows at one time.
    But when I am using preparedstatement to implement this function, it does not work. It did not throw any exception, but just does not work for me, the updated rows value always returns "0".
    Here is my simplified code:
    PreparedStatement ps = null;
    sqlStr = " delete from PLANNERS_OFFICES where planner = ? and office in (?) "
    Connection con = this.getConnection(dbname);
    try
    //set the sql statement into the preparedstatement
    ps = con.prepareStatement(sqlStr);
    ps.setString(1,"somename");
    ps.setString(2,"'officeone','officetwo','officethree'");
    int rowsUpdated =ps.executeUpdate();
    System.out.println(rowsUpdated);
    //catch exception
    catch (SQLException e)
    System.out.println("SQL Error: " + sqlStr);
    e.printStackTrace();
    catch (Exception e) {
    e.printStackTrace();
    } finally {
    this.releaseConnection(dbname, con);
    try{
    ps.close();
    }catch (SQLException e){
    e.printStackTrace();
    rowsUpdated always give me "0".
    I tried only delete one record at one time, "ps.setString(2, "officeone");", it works fine.
    I am guessing the second value I want to bind to the preparedstatement is not right, I tried several formats of that string, it does not work either.
    Can anyone give me a clue?
    Thanks in advance !
    Rachel

    the setString function in a preparedStatement doesn't just do a replace with the question mark. It is doing some internal mumbojumbo(technical term) to assign your variable to the ?.
    If you are looking to do your statement, then you will need to put in the correct of # of question marks as you need for the in clause.
    delete from PLANNERS_OFFICES WHERE PLANNER = ? and office in (?,?,?)
    If you need to allow for one or more parameters in your in clause, then you will need to build your SQL dynamically before creating your prepared statement.
    ArrayList listOfOfficesToDelete ;
    StringBuffer buffer = new StringBuffer("DELETE FROM PLANNERS_OFFICES WHERE PLANNER = ? AND OFFICE IN (");
    for(int i = 0; i < listOfOfficesToDelete.size(); i++ )
       if( i != 0 )
           buffer.append(",");
       buffer.append("?");
    buffer.append(")");
    cursor = conn.prepareStatement( buffer.toString() );
    cursor.setString(1, plannerObj);
    for(int i = 0; i < listOfOfficesToDelete().size(); i++ )
        cursor.setString(i+1, listOfOfficesToDelete.get(i) );
    cursor.executeUpdate() ;

  • Master Data Deletion : Logs of deleted MD entry from a MD object

    Hi All,
    I need to find details of deleted MD entry from a MD object and by whom ?
    In SLG1, I'm able to find only the logs showing deleted SID number. and user who has deleted it with date.
    But where, I can find what that deleted MD record is ?
    Thanks in advance !

    Is there any way to find it out ?

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Deleting a row from matrix by context menu

    Hi all
    does anyone know how can i cause right click on mouse button. on a certain row within a matrix to show a context menu with the option to delete the row. and when pressing the menu item handling the event of deleting the row from the matrix?
    appreciate the help
    Yoav

    Hi Yoav,
    Simply, 'context menu' have to be handled with 'menu event' object.
    It can be done by 'flushToDataSource' method and some tricks.
    Basically, method delete the row without any clause of addon code.
    But it's only can be done in display side.
    If you're using DBDataSource, you have to flush to the datasource.
    I mean, you have to update datasource with the data displayed in the matrix.
    and then, delete the last row of the datasource.
    FlushToDataSource doesn't affect to the number of rows in the datasource.
    You have to delete a row with a method of DBDatasource.. I can't remember the name.
    If, the matrix uses userdatasource, you don't need to delete a row in datasource.
    Because userdatasource doesn't have a concept of 'row', actually.
    Hope this helpful for you.
    Regards,
    Hyunil Choi

  • Deleting a row from JTable

    I am trying to delete a row from a JTable whenever the button on the last column is pressed. I know to do this, I can use the removeRow(int) method of the tableModel. But the odd thing is when I try to get a handle to the TableModel from the JTable to use that function, i.e. table.getModel().removeRow(int) it doesn't work. But if I explicitly pass in the tableModel into my class it does work. Here's the code below:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.UIManager;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableCellEditor;
    import javax.swing.AbstractCellEditor;
    import javax.swing.table.DefaultTableModel;
    public class tester4 extends JFrame
         protected final int BUTTON_COL = 2;
         private TableCellRenderer defaultRenderer;
         private TableCellEditor defaultEditor;
         private JTable workingTable;
         private String[] transactionCols = {"Qty", "Product", "Cancel"};
         private Object[][] data = {{5, "prod1", "Cancel"},
                   {6, "prod2", "Cancel"},
                   {7, "prod3", "Cancel"}};
        public tester4()
              workingTable = new JTable(tableModel);
              workingTable.setName("Working Table");
              defaultRenderer = workingTable.getDefaultRenderer(JButton.class);
              defaultEditor = workingTable.getDefaultEditor(Object.class);
              StatusTableRenderer testRenderer = new StatusTableRenderer(defaultRenderer, defaultEditor, workingTable, tableModel);
              workingTable.setDefaultRenderer(Object.class, testRenderer);
              workingTable.setDefaultEditor(Object.class, testRenderer);
            JScrollPane scrollPane = new JScrollPane( workingTable );
            getContentPane().add( scrollPane );
         private DefaultTableModel tableModel = new DefaultTableModel(data, transactionCols){
              // Only allow button column to be editable, if there is an actual
              // button in that row          
              public boolean isCellEditable(int row, int col){
                   return (col == BUTTON_COL && data[row][col] != "") ? true : false;
              // Overriden getColumnClass method that will return the object
              // class type of the first instance of the data type otherwise
              // returns the Object.class
              public Class getColumnClass(int column){
                for (int row = 0; row < getRowCount(); row++){
                    Object o = getValueAt(row, column);
                    if (o != null){ return o.getClass(); }
                return Object.class;
        public static void main(String[] args)
            tester4 frame = new tester4();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setVisible(true);
        public class StatusTableRenderer extends AbstractCellEditor
                                                implements TableCellRenderer,
                                                               TableCellEditor,
                                                               ActionListener{
             private TableCellRenderer defaultRenderer;
             private TableCellEditor defaultEditor;
             private JButton cancelButton;
             private JButton editButton;
             private String text;
             private int buttonColumn;
             private int selectedRow;
             private JTable table;
             private DefaultTableModel tableModel;
             public StatusTableRenderer(TableCellRenderer renderer,
                                           TableCellEditor editor,
                                           JTable table,
                                           DefaultTableModel tableModel){
                  defaultRenderer = renderer;
                  defaultEditor = editor;
                  this.table = table;
                  this.tableModel = tableModel;
                  buttonColumn = table.getColumnCount() - 1;
                cancelButton = new JButton();
                editButton = new JButton();
                editButton.setFocusPainted(true);
                editButton.addActionListener(this);
             public StatusTableRenderer(TableCellRenderer renderer,
                                                TableCellEditor editor,
                                                JTable table,
                                                DefaultTableModel tableModel,
                                                int _buttonColumn){
                  this(renderer, editor, table, tableModel);
                  buttonColumn = _buttonColumn;
             public Component getTableCellRendererComponent(JTable table, Object value,
                       boolean isSelected, boolean hasFocus, int row, int column) {
                  if (column == buttonColumn){
                       if (hasFocus){
                            cancelButton.setForeground(table.getForeground());
                            cancelButton.setBackground(UIManager.getColor("Button.background"));
                       else if (isSelected){
                            cancelButton.setForeground(table.getSelectionForeground());
                            cancelButton.setBackground(table.getSelectionBackground());
                       else{
                            cancelButton.setForeground(table.getForeground());
                            cancelButton.setBackground(UIManager.getColor("Button.background"));
                       cancelButton.setText( (value == null) ? "" : value.toString() );
                       return cancelButton;
                return defaultRenderer.getTableCellRendererComponent(
                            table, value, isSelected, hasFocus, row, column);
             public Component getTableCellEditorComponent(JTable table, Object value,
                       boolean isSelected, int row, int column){
                  if (column == buttonColumn){
                       text = ((value == null) ? "": value.toString());
                       editButton.setText(text);
                       selectedRow = row;
                       return editButton;
                  return defaultEditor.getTableCellEditorComponent(
                            table, value, isSelected, row, column);
            public Object getCellEditorValue()
                return text;
            public void actionPerformed(ActionEvent e)
                fireEditingStopped();
                // This works
                tableModel.removeRow(selectedRow);
               // This does not work
              //  table.getModel().removeRow(selectedRow);
    }Take a look at the actionPerfformed method. One way of doing it works, one doesn't. Just trying to understand why me getting a handle to the tableModel through the table doesn't work.
    Message was edited by:
    deadseasquirrels

    It gives me a run-time error Well then your question should be "why do I get this run-time error" and then you would quote the error. Be more descriptive. "It doesn't work" is not descriptive.
    table.getModel().removeRow(selectedRow);I don't use JDK1.5 either. But if you are saying that the above line compiles cleanly with JDK1.5 (because of the auto-boxing feature, or whatever its called), then I see no reason why the code wouldn't work since it recognizes the class as a DefaultTableModel.
    Presumably you commented out the other line so you don't try to delete the row twice. Otherwise you might be getting a indexing error.

  • How to delete a row from AbstractTableModel

    my table is using an object to populate the data.
    static Object[][] data = new Object[LineCount()][5];
    So when I delete a row, I should delete from the model or the object?
    Rgds

    When you populate your table with a two dimensional array, the table actually creates a DefaultTableModel (which extends AbstractTableModel). The DefaultTableModel has methods which allow you to add/remove row from the data model. Read the DefaultTableModel API for more information.

  • How to delete a row of table in Word using powershell.

    I want to search for a word which is present in Table. If that word is present than I want to delete that row from table.
    Can anybody help me with that. The script I am using is:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objDoc = $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objSelection.Find.Execute($FindText)
    $objWord.Table.Cells.EntireRow.Delete()
    $objDoc.SaveAs("C:\Temp\P.docx")
    $Doc.Close()

    Maybe try this:
    $objWord = New-Object -ComObject word.application
    $objWord.Visible = $True
    $objWord.Documents.Open("C:\temp\Recipe.docx")
    $FindText = "DP1"
    $objWord.Selection.Find.Execute($FindText) | Out-Null
    $objWord.Selection.SelectRow()
    $objWord.Selection.Cells.Delete()
    $objWord.Documents.SaveAs("C:\Temp\P.docx")
    $objWord.Close()
    $objWord.Quit()
    [System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$objWord) | Out-Null
    This definitely assumes the text you're trying to find only exists in a table, per your specified requirements.  If it exists anywhere else, or in multiple tables, the code above is inadequate.
    I hope this post has helped!

Maybe you are looking for

  • XI system getting

    All of our interfaces just stopped working and when we try and call it we are getting the following error in the SXMB_MONI: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/

  • Update with join

    Hello Everybody I have 3 tables in a maxdb 7.6 database rbarbeitsplanpos key=rbarbeitsplanposid column gewichtung,... rbaplposausf key=rbaplposausfid columns rbarbeitsplanposid,... rbqspruefpos key=rbqspruefposid columns rbaplposausfid,gewichtung,...

  • M1319f Laserjet MFP..no printer cartridge error when cartridge in machine.

    My Laserjet M1319f MFP for some reason today decided to display an error stating n printer cartridge.....funny thing is that there is one in the machine and it was never touched. I turned the machine on and of with no change error message still there

  • Email retrieval

    Is there a way to retrieve lost email from MacBook Pro OS X Mountain Lion?

  • Why won't Firefox load some pages correctly?

    On my everydayhealth.com site where I keep my fitness journal, suddenly the graphics are gone and all I have is a page with text and numbers on it. After it switches to this text page, at the very top it will say "Location TemplateTop not found in pa