Other database delete is not working on forall statement

Dear all,
My scenario is , i create a program, the program fetch the data from database x and i want to delete on the same x database but i am running this program at y database, so
so i created a view
create or replace view vw_ibs_pda_bills_x as
SELECT *
        FROM ibs_pda_bills_x@testarch1my program
Declare
      CURSOR c2 IS
      SELECT *
        FROM vw_ibs_pda_bills_x
       WHERE bill_month <= '31-dec-2008'; -- AND bpref_no = :cons;
       opr varchar2(10) := 'DELETE';
      TYPE tsch IS TABLE OF c2%ROWTYPE;
      vtsch      tsch;
      cnt        NUMBER := 0;
      stime      NUMBER;
      etime      NUMBER;
      DURATION   NUMBER;
      rcount     NUMBER;
      errorsd   PLS_INTEGER;
      ecode     NUMBER;
      val1   VARCHAR2 (100);
      val2   VARCHAR2 (100);
      val3   VARCHAR2 (100);
      val4   VARCHAR2 (100);
   BEGIN
      BEGIN
         stime := DBMS_UTILITY.get_time ();
         OPEN c2;
         LOOP
            FETCH c2
            BULK COLLECT INTO vtsch LIMIT 1000;
            IF vtsch.COUNT = 1000
            THEN
               cnt := cnt + 1;
            END IF;
        If opr = 'INSERT' Then
                FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
                      INSERT INTO dlul.ibs_pda_bills
                    VALUES vtsch (i);
        Else
                FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
                    Delete from vw_ibs_pda_bills_x where bill_month = vtsch(i).bill_month;
        End if;
            EXIT WHEN c2%NOTFOUND;
         END LOOP;
         etime := DBMS_UTILITY.get_time ();
         DURATION := ((etime - stime) / 100) / 60;
         rcount :=
             (cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
     If opr = 'INSERT' Then
         INSERT INTO process_stage_log
              VALUES (SYSDATE, 'IBS_PDA_BILLS', DURATION, rcount);
     Else
         INSERT INTO process_stage_log
              VALUES (SYSDATE, 'IBS_PDA_BILLS-D', DURATION, rcount);
     End if;
         CLOSE c2;
         COMMIT;
      EXCEPTION
         WHEN OTHERS
         THEN
            errorsd := SQL%BULK_EXCEPTIONS.COUNT;
            IF errorsd > 0
            THEN
               FOR j IN 1 .. errorsd
               LOOP
                  ecode := SQL%BULK_EXCEPTIONS (j).ERROR_CODE;
                  val1 :=
                       vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).sch_code;
                  val2 :=
                       vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bpref_no;
                  val3 :=
                     vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bill_month;
                  val4 :=
                     vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).service_code;
              If opr = 'INSERT' Then         
                  INSERT INTO process_error_log
                       VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
                               'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'INSERT');
          Else
                  INSERT INTO process_error_log
                       VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
                               'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'DELETE');
          End if;
               END LOOP;
            END IF;
      END;
   END pda_insert;the program want to do the delet option for all delete is not working. The program executed successful but the operation delete is not happening
how to solve this issue.
please help me
kanish

No error encountered in my log table
the new workaround you said, that is instead of for all , already i tried for i in 1.. to like
instead of forall delete i tried the following way
Declare
      CURSOR c2 IS
SELECT *
        FROM ibs_pda_bills_x@testarch1
       WHERE bill_month <= '31-dec-2008'; -- AND bpref_no = :cons;
       opr varchar2(10) := 'DELETE';
      TYPE tsch IS TABLE OF c2%ROWTYPE;
      vtsch      tsch;
      cnt        NUMBER := 0;
      stime      NUMBER;
      etime      NUMBER;
      DURATION   NUMBER;
      rcount     NUMBER;
      errorsd   PLS_INTEGER;
      ecode     NUMBER;
      val1   VARCHAR2 (100);
      val2   VARCHAR2 (100);
      val3   VARCHAR2 (100);
      val4   VARCHAR2 (100);
   BEGIN
      BEGIN
         stime := DBMS_UTILITY.get_time ();
         OPEN c2;
         LOOP
            FETCH c2
            BULK COLLECT INTO vtsch LIMIT 1000;
            IF vtsch.COUNT = 1000
            THEN
               cnt := cnt + 1;
            END IF;
        If opr = 'INSERT' Then
                FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
                      INSERT INTO dlul.ibs_pda_bills
                    VALUES vtsch (i);
        Else
               /* fORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
                 Delete from vw_ibs_pda_bills_x where to_char(bill_month,'dd-mm-rrrr') = to_char(vtsch (i).bill_month,'dd-mm-rrrr');*/
                 for i in 1..vtsch.count loop
                   delete ibs_pda_bills_x@testarch1 where to_char(bill_month,'dd-mm-rrrr') = to_char(vtsch (i).bill_month,'dd-mm-rrrr');
                 end loop; 
        End if;
            EXIT WHEN c2%NOTFOUND;
         END LOOP;
         etime := DBMS_UTILITY.get_time ();
         DURATION := ((etime - stime) / 100) / 60;
         rcount :=
             (cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
     If opr = 'INSERT' Then
         INSERT INTO process_stage_log
              VALUES (SYSDATE, 'IBS_PDA_BILLS', DURATION, rcount);
     Else
         INSERT INTO process_stage_log
              VALUES (SYSDATE, 'IBS_PDA_BILLS-D', DURATION, rcount);
     End if;
         CLOSE c2;
         COMMIT;
      EXCEPTION
         WHEN OTHERS
         THEN
            errorsd := SQL%BULK_EXCEPTIONS.COUNT;
            IF errorsd > 0
            THEN
               FOR j IN 1 .. errorsd
               LOOP
                  ecode := SQL%BULK_EXCEPTIONS (j).ERROR_CODE;
                  val1 :=
                       vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).sch_code;
                  val2 :=
                       vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bpref_no;
                  val3 :=
                     vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bill_month;
                  val4 :=
                     vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).service_code;
              If opr = 'INSERT' Then         
                  INSERT INTO process_error_log
                       VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
                               'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'INSERT');
          Else
                  INSERT INTO process_error_log
                       VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
                               'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'DELETE');
          End if;
               END LOOP;
            END IF;
      END;
   END pda_insert;i am receiving the following error
ORA-02055: distributed update operation failed; rollback required
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 77
ORA-06531: Reference to uninitialized collection
kanish

Similar Messages

  • At the top of my Mozilla home page, it lists the current URL site I am on. How do I delete them and the others in the drop down box? Highlighting and hitting delete does not work

    At the top of my Mozilla home page, it lists the current URL site, such as http://www.safeco.com, I am on plus the others in the drop down box. How do I delete them. Highlighting and hitting delete does not work.
    I am using windows Vista 007 and Mozila 3.6.1.3

    Do those entries have a yellow star at the far right?
    If they have then they are bookmarks. You can remove them if you open that link and click the star to open the Edit This Bookmark dialog and click the Remove button in that dialog.
    * [[Clearing Location bar history]]
    * [[Cannot clear Location bar history]]

  • Creation of a Database Schema is not working (Into a Sync Group)

    Hello,
    We have in: Sql Databases > Sync > Sync Group, a group called "SyncGroupViviendasProyectosVentasPruebas"
    If we go to "Sync Rules" and click "DEFINE SYNC RULES", no matter the databse we choose (there are 2), when we click in "REFRESH
    THE DATABASE SCHEMA" it dont works!
    It seems to be working but minutes later there is no Schema created.
    Why? Why the Create Database Schema is not working?
    Thanks,

    The detail error log from our service backend is:
    'Type=Microsoft.SqlServer.Management.Sdk.Sfc.InvalidVersionEnumeratorException,Message=Operation not supported on version 11.0 SqlAzureDatabase.,Source=Microsoft.SqlServer.SqlEnum,StackTrace=   at Microsoft.SqlServer.Management.Smo.XmlReadDoc.LoadFile(Assembly
    a&#44; String strFile)
       at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitDataFromAssemblyInternal(Assembly assemblyObject&#44; String file&#44; ServerVersion ver&#44; String alias&#44; StringCollection requestedFields&#44; Boolean store&#44;
    StringCollection roAfterCreation&#44; DatabaseEngineType databaseEngineType)
       at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitData(String file&#44; ServerVersion ver&#44; DatabaseEngineType databaseEngineType)
       at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.LoadElement(ObjectLoadInfo oli&#44; ServerVersion ver&#44; DatabaseEngineType databaseEngineType)
       at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetElement(ObjectLoadInfo oli&#44; ServerVersion ver&#44; DatabaseEngineType databaseEngineType)
       at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetAllElements(Urn urn&#44; ServerVersion ver&#44; DatabaseEngineType databaseEngineType&#44; Object ci)
       at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetObjectsFromCache(Urn urn&#44; Object ci)
       at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo&#44; Request request)
       at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo&#44; Request request),'
    It might be a collation/SMO issue after I do some research, so may I know that have you change the collation of you SQL Azure database? If yes, please try to use default collation and try again.
    Regards,
    Bowen

  • In iTunes 11.1 (I26) , I cannot find how to delete podcast listings showing undownloaded podcasts. Delete does not work. Option Delete does not work.  Dragging to the trash does not work. Under Edit, Delete is greyed out. Mac OS 10.6.8

    in iTunes 11.1 (I26) , I cannot find how to delete podcast listings showing undownloaded podcasts. Delete does not work. Option Delete does not work. Dragging to the trash does not work. Under Edit, Delete is greyed out. Mac OS 10.6.8.
    Tom at the Genius Bar told me that Option Delete would work. It does not.
    I had to upgrade to iTunes 11.1.(I26) because it is required with OS7 on my iPod Touch (5th Gen). I have tried shutting down iTunes, then shutting down the entire system. This is the first in many visits that the Genius Bar gave me a solution that did not work.
    This is a big awkward computer locked to my desk. I would rather not unlock it and then carry it through a shopping center to the Genius Bar if i can avoid oit.
    When I installed iTunes 11.1, I discovered that Ihad to resubscribe to virtually all of the podcasts that I had previously been subscribed to. That was a surprise.

    Hello Achates:
    I did not read the rather long post. If you wish to reinstall OS X 10.4, use your software install DVD. Backup is essential. To minimize your risk, I would use an archive and install:
    http://docs.info.apple.com/article.html?artnum=107120
    In that way, you will have a fresh copy of OS X and your current settings will be preserved.
    Incidentally, I do not agree that the printer problem is best solved by reinstalling OS X. I have had HP printers for sometime and, on one occasion, had difficulty after an upgrade. HP technical support walked me through uninstalling all traces of the HP driver and then reinstalling.
    Barry

  • Multiple delete is not working.

    Hi,
    Multiple delete is not working. Please find my backend bean code. Please let me know the issue in my code.
    Table:
    <af:table value="#{bindings.CmProcessParamValueView13.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView13.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView13.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView13.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView13.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView13.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="720px" inlineStyle="height:140px;" partialTriggers="cb6 cb3"
    filterVisible="true" filterModel="#{bindings.CmProcessParamValueView13.queryDescriptor}" >
    <af:column sortProperty="ParamValue7"
    sortable="true" width="690"
    headerText="Comm Type"
    rowHeader="unstyled"
    id="c2" align="left" filterable="true">
    <af:outputText value="#{row.ParamValue7}"
    id="ot4"/>
    </af:column>
    </af:table>
    Backing Bean Delete Code:
    RowKeySet rowKeySet = (RowKeySet)this.t1.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.t1.getValue();
    System.out.println("RowKeySet is: "+ rowKeySet.getSize());
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    System.out.println("RowData is : "+rowData.getAttribute("ParamValue7"));
    rowData.getRow().remove();
    Thanks.

    Issue is resolved...
    Solution is,
    Remove selectionListener and selectedKey attributes from the table.
    Delete code is:
    DCBindingContainer dcBindings =
    (DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator =
    dcBindings.findIteratorBinding("Iterator...");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    if(row != null)
    row.remove();
    }

  • HT1750 space.bar.and.delete.key.not.working.on.wireless.keyborad

    space.anddelte
    space.and.delete.keys.not.working.on.wireless.keyboard.help!

    Before replacing the keyboard do 2-3 SMC resets using the instructions in iMac SMC and PRAM reset

  • Is it possible to check automati all bookmarks, and delete the not working bookmarks

    Is it possible to check automatic all bookmarks, and delete the not working bookmarks

    Try this extension:
    *CheckPlaces: https://addons.mozilla.org/firefox/addon/checkplaces/

  • My database connectivity is not working inspite of installing sql express

    My database connectivity is not working inspite of installing sql express ...what should I do so that my database works

    Hello karan7,
    In addition to pvdg's post, can you reproduce this issue with a new fresh database? If you can this means it is a SQL Setup related problem. If you cannot, your database file may already corrupt.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have a MacBook Air using Maverick. I have files in the trash I want to recover. I do not have "Put Back" and Command   Delete does not work.

    I have a MacBook Air using Maverick. I have files in the trash I want to recover to their original files. I do not have "Back Up" and "Command + Delete" does not work.

    Drag them out of the Trash and put them in their original location. Put Back may work on one file at a time.

  • I have a iPhone4 acquired in Portugal. I will be moving to the EQUATOR (South America). Whenever I have visited the country before, with other cellphones, they did not work (different band) forcing me to buy a local cellphone. Will my iPhone4S work there?

    I have a iPhone4S acquired in Portugal. I will be moving to the EQUATOR (South America). Whenever I have visited the country before, with other cellphones, they did not work (different band) forcing me to buy a local cellphone. Will my iPhone4S work there?

    If it is unlocked it will work if you get a SIM from the carrier you will be using. Note that Apple does not and cannot unlock phones. Only the carrier it is presently locked to can unlock it.

  • Vodadfone India 3G is not working on my iphone 5S. Tried manual network selection as suggest by others. still it is not working. any help is greatly appreciated

    Vodadfone India 3G is not working on my iphone 5S. Tried manual network selection as suggest by others. still it is not working. Any help is greatly appreciated

    Hello Tony Lobo
    Try out the article below for issues with connecting to cellular on your iPhone. 
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/TS2755
    Resolution
    Follow these steps for help troubleshooting cellular data issues on your iPhone. After performing each step, please test to see if the issue is resolved.
    Toggle airplane mode: Tap Settings, turn airplane mode on, wait three seconds, and then turn off again.
    Restart your iPhone.
    Make sure that your software is up to date:
    Check for a Carrier Settings Update: Tap Settings > General > About.
    Check for an iOS Software Update: Tap Settings > General > Software Update.
    Note: Some updates may require a Wi-Fi connection.
    Remove the SIM Card and reinsert it. Allow the iPhone to acquire the network again.
    If your SIM card has SIM PIN enabled, try turning it off: Tap Settings > Phone > SIM PIN.
    Try another location. If a different location works, but the original location still doesn't, contact your carrier to report the issue.
    Reset network settings: Tap Settings > General > Reset > Reset Network Settings.
    Restore the iPhone as new.
    Contact your carrier to:
    Verify that the iPhone is properly set up on the account with the appropriate, current data plan.
    Verify that there are no account-related blocks.
    Find out if there are specific error messages in the carrier logs that could help determine why the issue is occurring.
    If none of the above steps resolves the issue, contact your carrier, make an appointment at an Apple Retail Store, or contact AppleCare to troubleshoot further.
    Regards,
    -Norm G.

  • MDX -Children count function Not working in Case statement

    Hi,
    I am trying to create set when you slice with the Hierarchy member is leaf level , I want a output only that Leaf level .
    and When I slice with  the parent level , it has to give all the members below that parent level.
    But the problem here is when I select child member or leaf member , The first condition in the Case is not working
    WITH SET
    TESTSET AS
    CASE
    WHEN
     [Dimension].[Hierarchy].currentmember.children.count<0
    THEN
     [Dimension].[Hierarchy].currentmember
    ELSE
     DESCENDANTS([Dimension].[Hierarchy].Currentmember,,AFTER)
    END
    SELECT
    WBSSET ON 1,
    {} on 0
    FROM
     (SELECT {[Dimension].[Hierarchy].&[10]} ON COLUMNS FROM [CubeName])
    Thanks,
    Santosh

    Hi Santosh,
    I don't think Children count function not working in case statement, I have tested it on my local environment, here s the sample query for you reference.
    with member
    testset as
    case
    when
    [Geography].[Geography].currentmember.children.count<10
    then "X"
    else "OK"
    end
    select testset on 0,
    {[Geography].[Geography].[Country].members} on 1
    from
    [Adventure Works]
    In your scenario, the issue might be caused by the query isself, you can try to use IsLeaf Funcion to achieve your requirement. Please refer to the links below.
    http://msdn.microsoft.com/en-us/library/ms144932.aspx
    http://www.databasejournal.com/features/mssql/article.php/3633696/MDX-Operators-The-IsLeaf-Operator--Conditional-Logic-within--Calculations.htm
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=22
    Regards,
    Charlie Liao
    TechNet Community Support

  • SQL Server 2012 Database Email is not working with AWS SES Services

    Hi Greetings to all,
    I have issue with the SQL Server Database mail Services. I have Configured Amazon Simple Email Services (AWS SES) as db profile in SQL Server and for last 2 years its working perfectly. But, from last two days on wards it is not working properly the Emails
    are queued but not sent to the recipients. the SES Services are working fine in outlook. but, not working in SQL Server. 
    Please help on this. tried changing the ports no result only one or two emails only sent remaining are failing.the info messages is as below
    Message
    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 10 (2015-04-10T17:12:41). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    RehaanKhan. M

    Hello,
    Try to use port 465, port 2587 or port 587 instead of using port 25, as explained on the following articles.
    http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-issues.html
    http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html
    The first of above URLs is intended for troubleshooting SMTP issues in general.
    Verify you the mail account has not reached any limit. Limit of emails per day, per second, etc.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Delete is not working properly

    I modified the Delete server behavior to delete associated
    records from the child tables and then delete the parent table as
    follows:
    if ((isset($_POST['peereduid'])) &&
    ($_POST['peereduid'] != "")) {
    $deleteTPRSQL = sprintf("DELETE FROM TEENPEERRELATIONSHIP
    WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteTPRSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteCRBSQL = sprintf("DELETE FROM CONTACTREFERREDBY WHERE
    PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteCRBSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteCTSQL = sprintf("DELETE FROM CONTACTTOPIC WHERE
    PEEREDU_OWNS_ID=%s
    AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteCTSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteCMSQL = sprintf("DELETE FROM CONTACTMATERIAL WHERE
    PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteCMSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteCSSQL = sprintf("DELETE FROM CONTACTSERVICE WHERE
    PEEREDU_OWNS_ID=%s
    AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteCSSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deletePRTSQL = sprintf("DELETE FROM PEERRECOMMENDSTALK
    WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deletePRTSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteTPASQL = sprintf("DELETE FROM TEENPROMISESACTION
    WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteTPASQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteTPTSQL = sprintf("DELETE FROM TEENPROMISESTALK WHERE
    PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteTPTSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteTPMVSQL = sprintf("DELETE FROM
    TEENPROMISESMEDICALVISIT WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s
    AND PEEREDU_TALKS_ID=%s AND CONTACT_DATE=str_to_date(%s,
    '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteTPMVSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteSQL = sprintf("DELETE FROM CONTACT WHERE
    PEEREDU_OWNS_ID=%s
    AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
    CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
    GetSQLValueString($_POST['peereduid'], "int"),
    GetSQLValueString($_POST['teenid'], "int"),
    GetSQLValueString($_POST['peeredutalksid'], "int"),
    GetSQLValueString($_POST['contactdate'], "date"));
    mysql_select_db($database_cnPeer_Outreach,
    $cnPeer_Outreach);
    $Result1 = mysql_query($deleteSQL, $cnPeer_Outreach) or
    die(mysql_error());
    $deleteGoTo = "peerselect.php";
    if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
    header(sprintf("Location: %s", $deleteGoTo));
    The problem is that the deleteGoTo is not working. After the
    delete, I am shown the original page again. Can anyone tell me what
    I need to do to get it working?

    Hi paramu
    I think you didn't get my question
    The new row is not saved into DB, user add a new record simply he change his mind half way and need
    to delete new record in form (As I understand this row only created in related iterator)
    So he expect after delete form goes back to previous state
    Thanks
    Mohsen

  • Delete button not working on the desktop

    Hello There,
    I am a new mac user. I don't know but for some reason, delete button on the desktop is not working, i.e. if I want to delete something I have to right click and then select "move to trash", is there are workaround for that, or it is like that only.
    Thanks in advance!!
    Regards
    Nikhil

    Hi There,
    First, welcome to Macintosh! To delete a file, use Command + Delete (The key with the apple logo on it is the command key.) Pressing delete alone will not move the file to the trash.
    Good luck!

Maybe you are looking for

  • Firefox crashing when closing and at other random times

    Hi - I'm running firefox 6.0.2 on a Win7 64-bit machine that my cowowker uses. Starting a day or two ago, FF began crashing instead of starting. I can start it in Safe Mode, and I believe I've removed all the add-ons. When in safe mode I can use FF,

  • How can I remove photos from the istream

    To not see photos I have to switch istream off? how can I remove the photo?

  • Issue with Illustrator CS6 - can't get it to run

    Since a couple of weeks ago, I have an issue with Illustrator CS6 - can't get it to run When starting the application I get the following error: "The procedure entry point ?AcquireVarient@ImageInterface@drawbot@dvaui@@QBE?BV?$intrusive_ptr@UImageInte

  • IDisk has information not visible in iWeb

    When I go to my Web Gallery to view, download, or upload, there is no problem. When I browse my site, or friends to, there is also no problem(by site I mean http://web.mac.com/[AppleID]). Normally, all information, if hosted with .Mac, made with iWeb

  • Some emails are not delivered, also not in LOG, no Bounce message

    I am Using Mountain lion server with the server app installed. Not the strange thing is that a lot email is not delevered to my email clients, but some are. The email that is having problems is [email protected] Does anybody know how to debug where th