Inventory record is deleted but quant is in 'Not counted' status within Bin

Hi Gurus,
I have a problem which is related to Inventory count in warehouse. The Bins are showing certain Inventory number is as not counted ( against the quant in Inventory tab of Bin) . But when I go to the Inventory record, I find it's deleted. For an ideal situation when an Inventory record is deleted, the bin should update the quant as Cancelled aginst the Inventory number, in the Invent. tab on Bin. But instead this is updated as 'Not counted'.
This is causing me a problem regarding any transfer transfer of those stocks since in the LQUA table the Inventory Active is checked.
Can you please help me.
Thanks in advance
Amit

hi pavan,
whats happening is just to give u an idea about my tables, i have
SELECT prod_code, prod_name, prod_qty_in_hand from product_MASTER
PROD_C PROD_NAME                      PROD_QTY_IN_HAND
2002   PROD2                                 10.000
2003   PROD3                         20.000
2004   PROD4                            30.000i have a master-detail Form for PURCHASE_ORDER_HEADER & PURCHASE_ORDER_DETAIL
(with Delete Record Behavior property set as Cascading),
for example lets say if i have record like
SQL> SELECT POH_CODE,POH_NO, POH_PARTY_CODE FROM purchase_ORDER_HEADER;
POH_CO        POH_NO POH_PA
PUR            1.000 1001
SQL> SELECT POD_POH_CODE,POD_POH_NO,POD_PROD_CODE,POD_QTY FROM purchase_ORDER_DETAIL;
POD_PO    POD_POH_NO POD_PR       POD_QTY
PUR            1.000 2002          5.000
PUR            1.000 2003          8.000
PUR            1.000 2004          10.000whats happening is, on form when i am querying record, lets say i want to delete the PO_header record no.1,
it should obviously delete the 3 records of PO_Detail (due to cascade property), and also, reduce the prod_qty_in_hand field for the 3 items 2002,2003 & 2004 (deleted from the PO_detail above), from the PRODUCT_MASTER Table, to 5,12 & 20 respectively.
i am able to update the prod_qty_in_hand , if after query, i go in the detail section & delete a particular record, but can't do it at header level with given the pre-delete code that i posted in my first post.
hope i am

Similar Messages

  • Tables are deleted but database size does not change in sql server 2008r2

    Hi All,
    20GB Tables are deleted in my database but database size does not change and disk size showing same size.

    Hi ,
    I have ran the Disk usage by Top Tables report and Identified couple of tables with unwanted data for last 5 years. I have deleted the data for the first 3 years and then ran the Disk usage by Top Tables report again. When I compared the report before
    and after the data deletion, I have noticed certain facts which is not matching with what I know or learned from experts like you. The following are the points where I am looking for clarification:
    1.Reserved (KB) has been reduced. I was expecting the data Reserved (KB) will remain the same after the data deletion. 
    2. The Data(KB) and Indexes(KB) fields have been reduced as expected. The Unused(KB) field have been increased as expected.
    I was expecting the total of Data(KB) and Indexes(KB) field space gained will be equal to the Unused(KB) field gained after deleting the data. But that is not the case. When I deducted(subtracted) the difference in  the Reserved(KB)(Difference before
    and after data deletion) field from the Total of space gained from the data deletion is equal to the Unused(KB) gained field value.
    I am not a SQL expert and not questioning but trying to understand whether we really gain space by deleting data from the tables. Also keen to get the concepts right, but my testing by deleting some records confused me.
    Looking ahead to all your expert advice.
    Thanks,
    Vennayat

  • FA - Asset accidentally deleted but depreciation process was not run

    Hi,
    Accidentally I have deleted an asset that I should not delete but I did not run the depreciation process.
    If I go to Transaction details, it says in status = “Pending”
    Is there any way to rollback this or to cancel the transaction and make the asset active again?
    Thanks,
    Facundo.

    This are the steps that I made:
    1. Go to Assets -> Asset workbench
    2. Look to the asset and click on retirements
    3. I complete all needed information and save it.
    That´s all what I did. If I go to the transaction, the field status shows "Pending".
    Is there any way to cancel this retirement?

  • A document in Queue i asked it to be deleted .But it just WILL NOT go away / H C4780 Photosmart

    I'm  trying to print out my list for inventory .And I got half way thru the different departments and now all it will print is everything but what I have selected.I'm  using Microsoft Office Excel 2007.....UUGGH  so frustrated   NEED  THESE FOR  TOMORROW  ...............HELP ..PLEASE

    Hi,
    Try the following to clear out the print queue.
    From the Control Panel, open Administrative Tools and select Sevices.  Browse down to the print spooler service, right click it and select Properties then click on the Stop button.  Now browse to C:\Windows\System32\Spool\PRINTERS and delete the job inside this folder - You may need to click a prompt to gain the appropriate authority to open the PRINTERS folder.
    Restart the computer and you should find the document(s) have been removed.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • A recording that works but the lsmw does not

    Hi,
       I have created a recording of the process which successfully changes the collection specialist in the collections managemenet role in the BP transaction.
    When I process data using this recording in lsmw the batch runs fine and tells me that all transactions processed successfully. However on checking the business partners none of the changes have in fact saved.
    Running the batch in foreground flows exactly the same as performing the manual change with the exception that there is no success message at the botton of the screen after the save button is pressed.
    Has anyone seen this behaviour before and know how to get the transactions to save correctly in SM35?
    kind regards,
    Ross Goodman

    Hi Rahul,
                 I have recorded transaction BP. I just noticed too that in fact the last transaction always saves to the database, but all transactions before that report as running fine in SM35 but in fact make no change. In lsmw when you look at the process log all the "BP nnnnn was changed" messages refer to the bp in the last transaction!!
    Ross

  • I am trying to record on MBA but the volume is not loud enough

    Hello,
    I'll try to break it down quickly. I have a 2011 11" MBA and I am using GarageBand.
    I use the Rocksmith jack to usb cable to play guitar and record it too, so far so good, no problem.
    So I wondered, can I make it work with a microphone? As I work on a electronic shop I had everything to test it on the latest 27" iMac. For the test I used a rocksmith cable, a jack 1/4 coupler, a male jack 1/4 to male XLR cable, and a shure PG48 microphone.
    I just had to put the recording level higher and everything was working just fine, great volume, great quality, perfect. So I bought all those cable that I was missing.
    Arrived at home, same cable, this time with the MBA 2011 and a Shure PG 58 instead. Same setting, and the volume is very low. I have to litteraly stick my mouth on the microphone to have a decent level of sound (and have to speak really loud too !). I've checked on the macbook setting, everything was to the maximum, tried with a Shure SM57 to see if it would work, same result.
    What is the problem? Is it the soundcard? Or the microphone? (That'd be weird tho') Did I forgot anything? It's weird because the guitar works just fine...
    If you can help me I'd be on happy dude !
    Thank you

    I´m using same config, MBA rocksmith cable and Mic powered by a (singleAA baterry) Ive tried recording in Quicktime (more or less noise, good volume), audacity(way too low volume) SoundtrackPro (same low volume), GARAGEBAND (lot better volume and very decent recording, great presets and much better export options!
    when you listen your recording on garageband it will sound LOW volume, im using mac headphones almost at max vol, maybe it lowers the volume so there is no feedback,... BUT whe you export to file and open it on Soundtrack or quicktime VOALA! normal voice recording is hitting 0dbs, so that gives me chance to lower down to -12dbs after doing my edits.
    Use GARAGEBAND to recrod voice, or any other intrument, works great with Rocksmith USB cable, mic does require use of AA battery.
    Busting my head with this for hrs until I tried Garageband.
    good luck.

  • Workflow gets deleted but dependant steps are not deleted

    Hi Experts,
    When OMR_DELETED event of BOR object ECO is raised, as per design the workflow instance is logically deleted. But all the dependant steps of the workflow are not getting deleted logically.
    Why is this happening?I mean why workitems generated for child steps are not deleted when parent workflow instance is logically deleted?
    Thanks,
    Sonali.

    Hi,
    as per design the workflow instance is logically deleted. But all the dependant
    steps of the  workflow are not getting deleted logically.
    Are you using wait to delete logically or through Function Module. Can you tell where you doing this.
    Regards,
    Surjith

  • Inventory scanning is successful, but performance gathering is not.

    I am running the MAP tool in my environment. I am able to successfully connect to all of my Windows servers and see the WMI information about their processors, memory, OS version, IP address, etc. When I run a 30 minute performance gathering test on them,
    only 12 of the 28 or so servers I'm scanning are reporting information. The rest of the servers aren't even appearing in the list of clients in the "CollectionStatistics" tab of the results spreadsheet.
    The 16 failing servers are successful in reporting their inventories, though, so I know WMI is enabled and the credentials I provided are correct.
    Troubleshooting procedures I've done:
    - pinged the server by name and IP successfully
    - Opened computer management (compmgmt.msc) and used the "connect to remote computer" option.  While connected I verified that Remote Registry is started and running.
    - Successfully established Telnet connections to the servers failing to report performance metrics on port 445 and 139.
    - used wbemtest to successfully establish a connection to the remote servers. I was able to run the query "select * from win32_useraccount" and observe results returned.
    At this stage I'm not sure what other tests to perform for troubleshooting. Has anyone else encountered this problem or have any advice as to how I can get these non reporting servers to start dumping performance data?

    The performance data collector requires remote registry to be enabled. See this TechNet Wiki article for more information:
    http://social.technet.microsoft.com/wiki/contents/articles/12163.map-prepare-the-environment-remote-registry-service.aspx
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Are messages I have not deleted but not backed up still on a server somewhere?

    Peculiar situation - I'll explan as succinctly as I can.
    Recently I had to restore my iphone. On it were stored a number of messages that I will describe as 'not deleted' but as I had not backed up successfully in some time - *cough* two months *cough* - the backup obviously did not restore them.
    The messages app is seemingly operating normally. No interruption is noted aside from problems associated with my carrier.
    Is there a way to retrieve those messages falling into the 'not deleted but historical and not captured by the backup' part of the resulting Venn diagram?

    Randomitable wrote:
    Are messages I have not deleted but not backed up still on a server somewhere?
    No.
    Your iPhone should back up whenever you connect it to your computer or if you are syncing to iCloud, whenever you plug it in while on wi-fi...

  • I have audio on my iOS imovie app that I want to delete. How can I do this. I tried recording over it but it still is heard.

    I have audio on my iOS imovie app that I want to delete. How can I do this. I tried recording over it but it still is heard.

    I think Apple User is mistaken and wandered into the wrong forum, do ignore that advise.
    I am unclear as to where the audio is?
    If you want to silence the audio on a clip in the timeline,
    double tap the clip,
    In the audio clip settings turn the sound off.
    If it is a sound recording, sound effect, or music then you can double tap, and choose delete.
    Have a look at this help guide, specifically the part under create a project, add and adjust audio
    http://help.apple.com/imovie/ipad/1.3/index.html
    http://help.apple.com/imovie/iPhone/1.3/index.html
    hope it helps

  • Error while Activating Inventory record in WM

    Hi All,
    I am getting an error while activating Inventory record using LI02N ,The Inventory record has been created using LICC Cycle Inventory at Quant Level.The error detrails are as below:
    Message Text:
    Function code cannot be selected
    Technical Data
    Message type__________ A (Cancel)
    Message class_________ BL (Application Log)
    Message number________ 001
    Message variable 1____ Function code cannot be selected
    Message variable 2____ 
    Message variable 3____ 
    Message variable 4____ 
    Message Attributes
    Level of detail_______ 
    Problem class_________ 4 (Additional information)
    Sort criterion________ 
    Number________________         
    Thanks you all in Advance.
    Regards,
    NVK                                                                               

    I am encountering a similar error whils tryng to create or display WM Physical Inventory documents.
    Tx: LX16 - Error Message no. BL001: u201CWarehouse number WH1 does not exist (check your entry)u201D
    Tx: LI01N and LI03N u2013 Error Message no. L4001: u201CWarehouse number WH1 does not exist (check your entry)u201D
    Errors when trying to create or display PIs, but can run reports on u201CWH1u201D and configuration looks ok?
    I cannot find anthing n SAP OSS for WM.
    Any assistance would be appreciated.

  • Free Items delivery not displayed in inventory records

    Hi
    We created sales A/R with item and issued free item.When we are going to inventory records, it is showing only sales item details but not free item.pls help
    Kishan Rao

    Dear Venkat,
    Please clarify to me a few things:
    1. The first line item is different than the second line item???
    2. If yes then you are maintaining the stock of the second line item seperately or in a seperate WH???
    3. If no then are you manintianing the items Serial No. wise. which will help you to differentiate which items to be given free.
    4. you have mentioned that the my problem is it is not deducted from the inventory records of the free qty.
    Which means that you are maintaining the items to be given free seperately. Here what is that you excatly require because when it tried the same the inventory does get deducted.
    Nagesh

  • Re: Displaying Current Record After Delete

    Hi all,
    I am using Jdeveloper 11.1.2.3.0
    I have two tables which has parent child relation among the both.
    I dragged the parent table as a adf form on to the .jspx page.
    Now if i am trying to delete fifth record in the parent table it is giving error message like "Table has child record, delete unsuccessful"
    It is fine, but the control going to first record after deletion.
    But i want to display current deleting record on the page if deletion is unsuccessful.
    Can anybody help me to resolve the above one.
    Thanks,
    Syam

    In this code when the bolded if condition fails i want to delete that record. I tried "delete struct1 index sy-tabix" but that record is not deleted.
    I tried "clear  struct1 ". its deletes the current record.
    but in some field its getting zero value & it is appending as a additional record.
    Please help me.
    loop at cdhdr.
    if ( it1-tcode = 'FSS0' or it1-tcode = 'FS00' ).
        w1_saknr = it1-objectid+4(10).
        w_orgid = it1-objectid+14(4).
       loop at it_cdpos  where changenr eq it1-changenr
                      and objectid eq it1-objectid
                       and   objectclas eq it1-objectclas.
       <b>If w_orgid in r_orgid.</b> 
      IF ( it_CDPOS-FNAME = 'XLOEV' AND it_cdpos-value_new eq 'X' ).
         replace struct1-change_ind with 'D' into struct1-change_ind.
                struct1-bukrs = w_orgid.
                struct1-cost = space.
                struct1-plant = space.
                append struct1.
          else.
             struct1-bukrs = w_orgid.
             struct1-change_ind = w_chngid.
             struct1-cost = space.
             struct1-plant = space.
             append struct1.
          endif.
       <b> else</b>.
        <b>delete struct1 index sy-tabix</b>.
      endif.
        append struct1.
           endloop.
    endif.
    endloop.

  • Delete Record Automatically deleting

    I have been trying to see if anyone has had this same issue with no real luck. I was hoping someone could give me a quick hand. I am created a delete record page as you would usually do. It is supposed to populate like any other page first so that yiou see the user's information. You should then be able to hit the delete button to delete the actual record. Unfortunately as soon as you go to the page it automatically deletes the record not giving you a chance to review the file first.
    Here is the standard delete record code from Dreamweaver:
    if ((isset($_GET['ID'])) && ($_GET['ID'] != "")) {
      $deleteSQL = sprintf("DELETE FROM entry WHERE ID=%s",
                           GetSQLValueString($_GET['ID'], "int"));
      mysql_select_db($database_toyosupport, $toyosupport);
      $Result1 = mysql_query($deleteSQL, $toyosupport) or die(mysql_error());
      $deleteGoTo = "/support/EnterDealer/Admin_Edit_dealer.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
        $deleteGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $deleteGoTo));
    My form is pretty basic:
    <form action="/support/EnterDealer/Admin_Edit_dealer.php" method="post" name="delete_User" id="delete_User">
    Form is set to post so i can;t see any reason it should automatically delete the file.
    Any ideas? 

    OK so thi sis not the "RIGHT" answer as I still don't know why it is automatically deleting. But with that in mind all I did was create a "View" page stating "ARE YOU SURE YOU WOULD LIKE TO DLETE THIS USER?" After that they are then sent to the delete record page which then deletes the record. If anyone wants to take a stab at it here is the complete code for the "delete" page. There may be something i am just not seeing ...
    <?php  session_start(); ?>
    <?php require_once('../../Connections/toyosupport.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    if ((isset($_GET['ID'])) && ($_GET['ID'] != "")) {
      $deleteSQL = sprintf("DELETE FROM entry WHERE ID=%s",
                           GetSQLValueString($_GET['ID'], "int"));
      mysql_select_db($database_toyosupport, $toyosupport);
      $Result1 = mysql_query($deleteSQL, $toyosupport) or die(mysql_error());
      $deleteGoTo = "/support/EnterDealer/Admin_Edit_dealer.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
        $deleteGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $deleteGoTo));
    $colname_rsDEALERLIST = "-1";
    if (isset($_POST['ID'])) {
      $colname_rsDEALERLIST = $_POST['ID'];
    mysql_select_db($database_toyosupport, $toyosupport);
    $query_rsDEALERLIST = sprintf("SELECT * FROM entry WHERE ID = %s", GetSQLValueString($colname_rsDEALERLIST, "int"));
    $rsDEALERLIST = mysql_query($query_rsDEALERLIST, $toyosupport) or die(mysql_error());
    $row_rsDEALERLIST = mysql_fetch_assoc($rsDEALERLIST);
    $totalRows_rsDEALERLIST = mysql_num_rows($rsDEALERLIST);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head>
    </head>
    <!--<body oncontextmenu="return false;">-->
    <body>
    <form method="post" name="delete_User" id="delete_User">
      <table border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#FFFFFF" width="100%">
        <tr valign="top" bgcolor="#FFFFFF">
          <td colspan="3" bgcolor="#3399CC" class="BoldTextBLK"><font class="drupal_blend_9pt">Please
            enter ALL  information.
            <input name="ID" type="hidden" id="ID" value="<?php echo $row_rsDEALERLIST['ID']; ?>" />
          </font></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td width="38%" bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt">First
            Name/Pr&eacute;nom <br />
            </font></span></td>
          <td width="14%" colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Name']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td width="38%" bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Last
            Name/Nom</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['NameLast']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#006699">
          <td height="5" bgcolor="#FFFFFF"> </td>
          <td height="5" colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Password']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Store
            Number <font size="1">(Toyo Account #)</font></font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['DealerNumber']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td width="38%" bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Company
            Name/Nom du D&eacute;taillant </font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Company']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Address/Adresee</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Address']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">City/Ville</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['City']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Province</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['DealerProv']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Postal
            Code/Code Postal</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['PostalCode']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Email/Courriel</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['EmailAddress']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Phone/Num&eacute;ro</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Phone']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt"><font class="drupal_blend_9pt">Fax</font></span></td>
          <td colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Fax']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#006699">
          <td height="5" bgcolor="#FFFFFF"><span class="Drupal_Blend_9pt">Price List</span></td>
          <td height="5" colspan="2" bgcolor="#FFFFFF"><?php echo $row_rsDEALERLIST['Plist_0']; ?><br />
            <?php echo $row_rsDEALERLIST['Plist_U']; ?> <br />
            <?php echo $row_rsDEALERLIST['Plist_G']; ?></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td colspan="3" bgcolor="#FFFFFF"><font class="drupal_blend_9pt"> </font></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF">
          <td width="38%" align="right" bgcolor="#FFFFFF"><font class="drupal_blend_9pt"><b>Delete record.</b></font><font color="#FF0000">Note this is permanent!</font></td>
          <td colspan="2" bgcolor="#FFFFFF"><font class="drupal_blend_9pt">
            <input name="Delete_User" type="submit" id="Delete_User" value="Delete_User" />
          </font></td>
        </tr>
      </table>
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($rsDEALERLIST);
    ?>

  • CS5 Update Record behaior deletes the record

    Hello
    I am having an issue that I just cant seem to understand or resolve.
    I am using the CS5 Update Record Server Bahavior to update the user table for a website, but instead if updating the record, it deletes the entire record.
    I look at the SQL and it is definately an Update, so I dont see how it deleting the entire record.
    What I did:
    Passed in record ID through querystring to get the filtered recordset
    Created update form for dynamic data (the corrent data is filling form from recoredset)
    Created hidden field to hold ID
    Clicked the Update Record Server Behavior and matched form variables to appropriate DB fields
    Set it to go to page to list all users
    Saved page
    Run on local server (php/MySQL)
    When I edit the user  data in the update form and click submit, the record is deleted.
    * I checked the MySQL DB and the entire recored has been deleted
    Anyone have a clue on why this is happening?
    Here's the code from the page:
    <?php require_once('../Connections/localconn.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "updateuser")) {
      $updateSQL = sprintf("UPDATE users SET fname=%s, lname=%s, uname=%s, password=%s, ulevel=%s WHERE id=%s",
                           GetSQLValueString($_POST['fname'], "text"),
                           GetSQLValueString($_POST['lname'], "text"),
                           GetSQLValueString($_POST['uname'], "text"),
                           GetSQLValueString($_POST['pword'], "text"),
                           GetSQLValueString($_POST['ulevel'], "int"),
                           GetSQLValueString($_POST['id'], "int"));
      mysql_select_db($database_localconn, $localconn);
      $Result1 = mysql_query($updateSQL, $localconn) or die(mysql_error());
      $updateGoTo = "users.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_Recordset_users = "-1";
    if (isset($_GET['id'])) {
      $colname_Recordset_users = $_GET['id'];
    mysql_select_db($database_localconn, $localconn);
    $query_Recordset_users = sprintf("SELECT * FROM users WHERE id = %s", GetSQLValueString($colname_Recordset_users, "int"));
    $Recordset_users = mysql_query($query_Recordset_users, $localconn) or die(mysql_error());
    $row_Recordset_users = mysql_fetch_assoc($Recordset_users);
    $totalRows_Recordset_users = mysql_num_rows($Recordset_users);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Title</title>
    <meta http-equiv="Content-Language" content="English" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">
    <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
    </head>
    <body>
    <div id="wrap">
    <div id="top"></div>
    <div id="content">
    <div class="header">
    <h1><a href="#">FENA </a></h1>
    <h2>Content Management System (CMS)</h2>
    </div>
    <div class="breadcrumbs">
    <a href="#">Home</a> &middot; Edit User
    </div>
    <div class="middle">
    <h2>Edit User - <?php echo $row_Recordset_users['lname']; ?>, <?php echo $row_Recordset_users['fname']; ?></h2>
    <form method="POST" action="<?php echo $editFormAction; ?>" name="updateuser"> 
    <table>
    <tr>
         <td>Last Name</td>
            <td><input name="lname" type="text" value="<?php echo $row_Recordset_users['lname']; ?>" /></td>
        </tr>
        <tr>
         <td>First Name</td>
            <td><input name="fname" type="text" value="<?php echo $row_Recordset_users['fname']; ?>" /></td>
        </tr>
        <tr>
         <td>Username</td>
            <td><input name="uname" type="text" value="<?php echo $row_Recordset_users['uname']; ?>" /></td>
        </tr>
        <tr>
         <td>Password</td>
            <td><input name="pword" type="text" value="<?php echo $row_Recordset_users['password']; ?>" /></td>
        </tr>
        <tr>
         <td>User Level</td>
            <td>
             <select name="ulevel">
                 <option value="<?php echo $row_Recordset_users['ulevel']; ?>"><?php echo $row_Recordset_users['ulevel']; ?></option>
                    <option value="1">Admin</option>
                    <option value="2">Editor</option>
                </select>
            </td>
        </tr>
        <tr>
         <td colspan="2" align="right"><input name="id" type="hidden" value="<?php echo $row_Recordset_users['id']; ?>" /><input name="submit" type="submit" value="Submit" /></td>
        </tr>
    </table>
    <input type="hidden" name="MM_update" value="updateuser" />
    </form>
    </div>
    <div class="right">
    <h2>Navigation</h2>
    <ul>
    <li><a href="index.php">Home</a></li>
    <li><a href="users.php">Users</a></li>
    <li><a href="users_add.php">Add User</a></li>
    </ul>
    </div>
    <div id="clear"></div>
    </div>
    <div id="bottom"></div>
    </div>
    <div id="footer">
    Developed by Me
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset_users);
    ?>

    Hi Paul,
    I am actually try to a create a submit a process and have it to update the DB.
    Thanks,
    Han

Maybe you are looking for

  • Unable to create RAID on SPARC-Enterprise-T5220

    hi: i got the following issue on my SPARC-Enterprise-T5220. i have constructed the RAID-1 on 4 disks out of 6. i have created RAID-1 on OS Disks using raidctl command on single user mode and i have created RADI-1 on other two disks. but i'm unable to

  • Webutil_Host and Client_Host

    Hi, I am wondering what is the difference between Webutil_host and Client_host? I am trying to call sqlplus.exe located in the server and run a text file in the client side. I am wondering if I use webutil_host or client_host? Thanks in advance!

  • Problems downloading itunes 7

    When I try to download the itunes 7, i get a message that says "file blocked - no valid digital signature that verifies publisher". I have McAfee security systems, using Windows XP. Not terribly computer "literate"--HELP hp pavilion xt948   Windows X

  • SRM and XI

    Hi Experts, I am currently going to work on SRM scenarios which will be Integrated with other systems via XI. I have already gone and still going through the documents provided by SAP and mentioned in different blogs in SDN, they are very useful. Sti

  • Scroll-bar poorly visible

    I would appreciate it very much if the vertical and horizontal slide-bars were better distinguished against the background with a color or a good visible sign on it. very often I have to search where my side-bar is left (i have a some vision-problems