How to return to record after updating (ie add a url with variable)

I want to put a link in to return to the page displaying the record after updating.  I followed the Dreamweaver insrtuctio an added this after the page url in the update behaviours:
?recordID=<?php echo $row_recordsetName['fieldName']; ?>
However the page does not load but gives this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\UwAmp\www\testmypms\update_spec_rx.php on line 77
Here's the page code:
<?php require_once('Connections/testmypms.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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"] == "updateSpecRx")) {
  $updateSQL = sprintf("UPDATE spec_rx SET spec_rx_date=%s, FK_user_id=%s, spec_rx_rsph=%s, spec_rx_rcyl=%s, spec_rx_raxis=%s, spec_rx_rhprism=%s, spec_rx_rhprismbase=%s, spec_rx_rvprism=%s, spec_rx_rvprismbase=%s, spec_rx_rnadd=%s, spec_rx_rnhprism=%s, spec_rx_rnhprismbase=%s, spec_rx_rnvprism=%s, spec_rx_rnvprismbase=%s, spec_rx_rintadd=%s, spec_rx_rinthprism=%s, spec_rx_rinthprismbase=%s, spec_rx_rintvprism=%s, spec_rx_rintvprismbase=%s, spec_rx_lsph=%s, spec_rx_lcyl=%s, spec_rx_laxis=%s, spec_rx_lhprism=%s, spec_rx_lhprismbase=%s, spec_rx_lvprism=%s, spec_rx_lvprismbase=%s, spec_rx_lintadd=%s, spec_rx_linthprism=%s, spec_rx_linthprismbase=%s, spec_rx_lintvprism=%s, spec_rx_lintvprismbase=%s, spec_rx_lnadd=%s, spec_rx_lnhprism=%s, spec_rx_lnhprismbase=%s, spec_rx_lnvprism=%s, spec_rx_lnvprismbase=%s, ext_rx=%s WHERE spec_rx_id=%s",
                       GetSQLValueString($_POST['rHprism'], "date"),
                       GetSQLValueString($_POST['userID'], "int"),
                       GetSQLValueString($_POST['rsph'], "double"),
                       GetSQLValueString($_POST['rcyl'], "double"),
                       GetSQLValueString($_POST['raxis'], "double"),
                       GetSQLValueString($_POST['rHprism'], "double"),
                       GetSQLValueString($_POST['rHprismbase'], "text"),
                       GetSQLValueString($_POST['rVprism'], "double"),
                       GetSQLValueString($_POST['rVprismbase'], "text"),
                       GetSQLValueString($_POST['rNradd'], "double"),
                       GetSQLValueString($_POST['rNrHprism'], "double"),
                       GetSQLValueString($_POST['rNrHprismbase'], "text"),
                       GetSQLValueString($_POST['rNrVprism'], "double"),
                       GetSQLValueString($_POST['rNrVprismbase'], "text"),
                       GetSQLValueString($_POST['rIntadd'], "double"),
                       GetSQLValueString($_POST['rIntHprism'], "double"),
                       GetSQLValueString($_POST['rIntHprismbase'], "text"),
                       GetSQLValueString($_POST['rIntVprism'], "double"),
                       GetSQLValueString($_POST['rIntVprismbase'], "text"),
                       GetSQLValueString($_POST['lsph'], "double"),
                       GetSQLValueString($_POST['lcyl'], "double"),
                       GetSQLValueString($_POST['laxis'], "double"),
                       GetSQLValueString($_POST['lHprism'], "double"),
                       GetSQLValueString($_POST['lHprismbase'], "text"),
                       GetSQLValueString($_POST['lVprism'], "double"),
                       GetSQLValueString($_POST['lVprismbase'], "text"),
                       GetSQLValueString($_POST['lIntadd'], "double"),
                       GetSQLValueString($_POST['lIntHprism'], "double"),
                       GetSQLValueString($_POST['lIntHprismbase'], "text"),
                       GetSQLValueString($_POST['lIntVprism'], "double"),
                       GetSQLValueString($_POST['lIntVprismbase'], "text"),
                       GetSQLValueString($_POST['lNradd'], "double"),
                       GetSQLValueString($_POST['lNrHprism'], "double"),
                       GetSQLValueString($_POST['lNrHprismbase'], "text"),
                       GetSQLValueString($_POST['lNrVprism'], "double"),
                       GetSQLValueString($_POST['rNrVprismbase'], "text"),
                       GetSQLValueString(isset($_POST['extRx']) ? "true" : "", "defined","1","0"),
                       GetSQLValueString($_POST['SpecRxID'], "int"));
  mysql_select_db($database_testmypms, $testmypms);
  $Result1 = mysql_query($updateSQL, $testmypms) or die(mysql_error());
  $updateGoTo = "spec_rx4.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $updateGoTo));
/*   date_default_timezone_set('Europe/London');
$date = strtotime($_POST['specRxDate']);
     $_POST['specRxDate'] = date("Y-m-d",$date); */
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_spec_rx = 1;
$pageNum_spec_rx = 0;
if (isset($_GET['pageNum_spec_rx'])) {
  $pageNum_spec_rx = $_GET['pageNum_spec_rx'];
$startRow_spec_rx = $pageNum_spec_rx * $maxRows_spec_rx;
$colname_spec_rx = "1";
if (isset($_GET['spec_RxID'])) {
  $colname_spec_rx = (get_magic_quotes_gpc()) ? $_GET['spec_RxID'] : addslashes($_GET['spec_RxID']);
mysql_select_db($database_testmypms, $testmypms);
$query_spec_rx = sprintf("SELECT demographics.px_id, demographics.FK_title_id, demographics.firstname, demographics.surname, title.title, title.title_id, spec_rx.spec_rx_id, spec_rx.FK_px_id, DATE_FORMAT(spec_rx.spec_rx_date, '%%d-%%m-%%Y') as formatted_rx_date, spec_rx.FK_user_id, spec_rx.spec_rx_rsph, spec_rx.spec_rx_rcyl, spec_rx.spec_rx_raxis, spec_rx.spec_rx_rhprism, spec_rx.spec_rx_rhprismbase, spec_rx.spec_rx_rvprism, spec_rx.spec_rx_rvprismbase, spec_rx.spec_rx_rnadd, spec_rx.spec_rx_rnhprism, spec_rx.spec_rx_rnhprismbase, spec_rx.spec_rx_rnvprism, spec_rx.spec_rx_rnvprismbase, spec_rx.spec_rx_rintadd, spec_rx.spec_rx_rinthprism, spec_rx.spec_rx_rinthprismbase, spec_rx.spec_rx_rintvprism, spec_rx.spec_rx_rintvprismbase, spec_rx.spec_rx_lsph, spec_rx.spec_rx_lcyl, spec_rx.spec_rx_laxis, spec_rx.spec_rx_lhprism, spec_rx.spec_rx_lhprismbase, spec_rx.spec_rx_lvprism, spec_rx.spec_rx_lvprismbase, spec_rx.spec_rx_lintadd, spec_rx.spec_rx_linthprism, spec_rx.spec_rx_linthprismbase, spec_rx.spec_rx_lintvprism, spec_rx.spec_rx_lintvprismbase, spec_rx.spec_rx_lnadd, spec_rx.spec_rx_lnhprism, spec_rx.spec_rx_lnhprismbase, spec_rx.spec_rx_lnvprism, spec_rx.spec_rx_lnvprismbase, spec_rx.ext_rx FROM spec_rx, demographics, title WHERE spec_rx.spec_rx_id = %s AND spec_rx.FK_px_id = demographics.px_id AND demographics.FK_title_id = title.title_id", $colname_spec_rx);
$query_limit_spec_rx = sprintf("%s LIMIT %d, %d", $query_spec_rx, $startRow_spec_rx, $maxRows_spec_rx);
$spec_rx = mysql_query($query_limit_spec_rx, $testmypms) or die(mysql_error());
$row_spec_rx = mysql_fetch_assoc($spec_rx);
if (isset($_GET['totalRows_spec_rx'])) {
  $totalRows_spec_rx = $_GET['totalRows_spec_rx'];
} else {
  $all_spec_rx = mysql_query($query_spec_rx);
  $totalRows_spec_rx = mysql_num_rows($all_spec_rx);
$totalPages_spec_rx = ceil($totalRows_spec_rx/$maxRows_spec_rx)-1;
mysql_select_db($database_testmypms, $testmypms);
$query_users = "SELECT users.user_id, users.username FROM users";
$users = mysql_query($query_users, $testmypms) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
$totalRows_users = mysql_num_rows($users);
$queryString_spec_rx = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_spec_rx") == false &&
        stristr($param, "totalRows_spec_rx") == false) {
      array_push($newParams, $param);
  if (count($newParams) != 0) {
    $queryString_spec_rx = "&" . htmlentities(implode("&", $newParams));
$queryString_spec_rx = sprintf("&totalRows_spec_rx=%d%s", $totalRows_spec_rx, $queryString_spec_rx);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Amend Spec Rx</title>
</head>
<body>
<p>Amend Spec Rx</p>
<p><?php echo $row_spec_rx['px_id']; ?></p>
<p><?php echo $row_spec_rx['title']; ?><?php echo $row_spec_rx['firstname']; ?><?php echo $row_spec_rx['surname']; ?> </p>
<form action="<?php echo $editFormAction; ?>" method="POST" name="updateSpecRx" id="updateSpecRx">
  <table border="1" cellpadding="5" cellspacing="1">
    <tr>
      <td> </td>
      <td>
     <td><?php date_default_timezone_set('Europe/London'); ?>
    <input name="specRxDate" type="text" id="specRxDate" value="<?php echo $row_spec_rx['formatted_rx_date']; ?>" size="10" maxlength="10" <?php echo 'value="'.date("d-m-Y").'"'; ?>></td>
      <td><input name="SpecRxID" type="text" id="SpecRxID" value="<?php echo $row_spec_rx['spec_rx_id']; ?>" size="2" maxlength="2"></td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
      <td>Sph</td>
      <td>Cyl</td>
      <td>Axis</td>
      <td>HPrism</td>
      <td>HPrismBase</td>
      <td>VPrism</td>
      <td>VPrismBase</td>
      <td>NrAdd</td>
      <td>NrHPrism </td>
      <td>NrHPrismBase</td>
      <td>NrVPrism</td>
      <td>NrVPrismBase</td>
      <td>IntAdd</td>
      <td>IntHPrism</td>
      <td>IntHPrismBase</td>
      <td>IntVPrism</td>
      <td>IntVPrismBase</td>
    </tr>
    <tr>
      <td>R</td>
      <td><input name="rsph" type="text" id="rsph" value="<?php echo $row_spec_rx['spec_rx_rsph']; ?>" size="6" maxlength="6">
      </td>
      <td><input name="rcyl" type="text" id="rcyl" value="<?php echo $row_spec_rx['spec_rx_rcyl']; ?>" size="6" maxlength="6">
      </td>
      <td><input name="raxis" type="text" id="raxis" value="<?php echo $row_spec_rx['spec_rx_raxis']; ?>" size="5" maxlength="5"></td>
      <td><input name="rHprism" type="text" id="rHprism" value="<?php echo $row_spec_rx['spec_rx_rhprism']; ?>" size="5" maxlength="5"></td>
      <td>        <select name="rHprismbase" id="rHprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rhprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="OUT" <?php if (!(strcmp("OUT", $row_spec_rx['spec_rx_rhprismbase']))) {echo "SELECTED";} ?>>OUT</option>
        <option value="IN" <?php if (!(strcmp("IN", $row_spec_rx['spec_rx_rhprismbase']))) {echo "SELECTED";} ?>>IN</option>
        </select></td>
      <td><input name="rVprism" type="text" id="rVprism" value="<?php echo $row_spec_rx['spec_rx_rvprism']; ?>" size="5" maxlength="5">
      </td>
      <td><select name="rVprismbase" id="rVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
      <td><input name="rNradd" type="text" id="rNradd" value="<?php echo $row_spec_rx['spec_rx_rnadd']; ?>" size="6" maxlength="6"></td>
      <td><input name="rNrHprism" type="text" id="rNrHprism" value="<?php echo $row_spec_rx['spec_rx_rnhprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="rNrHprismbase" id="rNrHprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rnhprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="OUT" <?php if (!(strcmp("OUT", $row_spec_rx['spec_rx_rnhprismbase']))) {echo "SELECTED";} ?>>OUT</option>
        <option value="IN" <?php if (!(strcmp("IN", $row_spec_rx['spec_rx_rnhprismbase']))) {echo "SELECTED";} ?>>IN</option>
      </select></td>
      <td><input name="rNrVprism" type="text" id="rNrVprism" value="<?php echo $row_spec_rx['spec_rx_rnvprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="rNrVprismbase" id="rNrVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_rnvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
      <td><input name="rIntadd" type="text" id="rIntadd" value="<?php echo $row_spec_rx['spec_rx_rintadd']; ?>" size="6" maxlength="6"></td>
      <td><input name="rIntHprism" type="text" id="rIntHprism" value="<?php echo $row_spec_rx['spec_rx_rinthprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="rIntHprismbase" id="rIntHprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rinthprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="OUT" <?php if (!(strcmp("OUT", $row_spec_rx['spec_rx_rinthprismbase']))) {echo "SELECTED";} ?>>OUT</option>
        <option value="IN" <?php if (!(strcmp("IN", $row_spec_rx['spec_rx_rinthprismbase']))) {echo "SELECTED";} ?>>IN</option>
      </select></td>
      <td><input name="rIntVprism" type="text" id="rIntVprism" value="<?php echo $row_spec_rx['spec_rx_rintvprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="rIntVprismbase" id="rIntVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rintvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_rintvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_rintvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
    </tr>
    <tr>
      <td>L</td>
      <td><input name="lsph" type="text" id="lsph" value="<?php echo $row_spec_rx['spec_rx_lsph']; ?>" size="6" maxlength="6">
      </td>
      <td><input name="lcyl" type="text" id="lcyl" value="<?php echo $row_spec_rx['spec_rx_lcyl']; ?>" size="6" maxlength="6">
      </td>
      <td><input name="laxis" type="text" id="laxis" value="<?php echo $row_spec_rx['spec_rx_laxis']; ?>" size="5" maxlength="5"></td>
      <td><input name="lHprism" type="text" id="lHprism" value="<?php echo $row_spec_rx['spec_rx_lhprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="lHprismbase" id="lHprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_lhprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="OUT" <?php if (!(strcmp("OUT", $row_spec_rx['spec_rx_lhprismbase']))) {echo "SELECTED";} ?>>OUT</option>
        <option value="IN" <?php if (!(strcmp("IN", $row_spec_rx['spec_rx_lhprismbase']))) {echo "SELECTED";} ?>>IN</option>
      </select></td>
      <td><input name="lVprism" type="text" id="lVprism" value="<?php echo $row_spec_rx['spec_rx_lvprism']; ?>" size="5" maxlength="5">
      </td>
      <td><select name="lVprismbase" id="lVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_rvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_rvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_rvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
      <td><input name="lNradd" type="text" id="lNradd" value="<?php echo $row_spec_rx['spec_rx_lnadd']; ?>" size="6" maxlength="6"></td>
      <td><input name="lNrHprism" type="text" id="lNrHprism" value="<?php echo $row_spec_rx['spec_rx_lnhprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="lNrHprismbase" id="lNrHprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_lnhprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="OUT" <?php if (!(strcmp("OUT", $row_spec_rx['spec_rx_lnhprismbase']))) {echo "SELECTED";} ?>>OUT</option>
        <option value="IN" <?php if (!(strcmp("IN", $row_spec_rx['spec_rx_lnhprismbase']))) {echo "SELECTED";} ?>>IN</option>
      </select></td>
      <td><input name="lNrVprism" type="text" id="lNrVprism" value="<?php echo $row_spec_rx['spec_rx_lnvprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="rNrVprismbase" id="rNrVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_lnvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_lnvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_lnvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
      <td><input name="lIntadd" type="text" id="lIntadd" value="<?php echo $row_spec_rx['spec_rx_lintadd']; ?>" size="6" maxlength="6"></td>
      <td><input name="lIntHprism" type="text" id="lIntHprism" value="<?php echo $row_spec_rx['spec_rx_linthprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="lIntHprismbase" id="lIntHprismbase">
        <option value=""> </option>
        <option value="OUT">OUT</option>
        <option value="IN">IN</option>
      </select></td>
      <td><input name="lIntVprism" type="text" id="lIntVprism" value="<?php echo $row_spec_rx['spec_rx_lintvprism']; ?>" size="5" maxlength="5"></td>
      <td><select name="lIntVprismbase" id="lIntVprismbase">
        <option value="" <?php if (!(strcmp("", $row_spec_rx['spec_rx_lintvprismbase']))) {echo "SELECTED";} ?>> </option>
        <option value="UP" <?php if (!(strcmp("UP", $row_spec_rx['spec_rx_lintvprismbase']))) {echo "SELECTED";} ?>>UP</option>
        <option value="DN" <?php if (!(strcmp("DN", $row_spec_rx['spec_rx_lintvprismbase']))) {echo "SELECTED";} ?>>DN</option>
      </select></td>
    </tr>
    <tr>
      <td> </td>
      <td><input name="pxID" type="text" id="pxID" value="<?php echo $row_spec_rx['px_id']; ?>" size="3" maxlength="3"></td>
      <td colspan="4"><input name="Update" type="submit" id="Update" value="Update"></td>
      <td><select name="userID" id="userID">
        <?php
do { 
?>
        <option value="<?php echo $row_users['user_id']?>"><?php echo $row_users['username']?></option>
        <?php
} while ($row_users = mysql_fetch_assoc($users));
  $rows = mysql_num_rows($users);
  if($rows > 0) {
      mysql_data_seek($users, 0);
      $row_users = mysql_fetch_assoc($users);
?>
      </select></td>
      <td>External
      <input <?php if (!(strcmp($row_spec_rx['ext_rx'],1))) {echo "checked";} ?> name="extRx" type="checkbox" id="extRx" value="checkbox"></td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
    </tr>
  </table>
    <input type="hidden" name="MM_update" value="updateSpecRx">
</form>
<p> </p>
</body>
</html>
<?php
mysql_free_result($spec_rx);
mysql_free_result($users);
?>
Thanks for any help

This post solves it:
How do I pass URL parameter after Update record?

Similar Messages

  • How To Hide the Record after Update from ADF Front End

    Hi Every One,
    I have done the Scenario of Database Table rows displayed in ADF front end. It is editing and updating also. My Query is after update the record, how to hide that record from adf front end.
    Could any one please help me.
    Thanks,
    Narasimhulu.S

    hi you can create transient field in view object indicate to visibility of row (boolean ) and create view criteria that show only rows that are able to be visible according to transient attribute and at the update process set the attribute to true inside entityImpl class

  • How to insert past record after updating the master table in history table through store PROC

    Master Table
    Party Status
    A Active
    B Inactive
    C Active
    D Inactive
    Duplicate Table
    Party Status
    A Active
    B Active
    C Active
    D Inactive
    Updated Master Table
    Party Status
    A Active
    B Active
    C Active
    D Inactive
    Party History Table
    B Inactive
    I have two table one master and another duplicate I need to update master table based on duplicate table insert the record which updated into Party history table as shown above. need help to write store proc.

    Check MERGE syntax in BOL (example D). There should be a sample with output, e.g.
    insert into PartyHistory (Party, [Status])
    select Party, [Status] FROM
    (MERGE Master M using Duplicate D on M.[Party]=D.[Party]AND M.[Status]<>D.[Status]
    WHEN MATCHED THEN UPDATE
    SET [Status] = D.[Status]
    OUTPUT Deleted.[Party], Deleted.[Status], $Action) AS Changes (Party, [Status], Action) WHERE Action = 'UPDATE'
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to return the record count of a query to a number variable

    How would I get the record count from a query without using a cursor to step through the query and count the records individually?
    query: select * from table1 where column1 = column2
    How would I get the record count of the query above?
    thanks,
    michelle

    I figured it out
    select count(*) into theCount
    from ( select * from table1 where column1=column2 );
    thanks,
    michelle

  • HT201210 how to activate iphone 4 after updating software to IOS 6?

    how to activate iphone 4 after updating software to IOS 6?
    please help..

    Your friend did an unofficial unlock and it has now locked back to the original cell carrier. You need to call AppleCare, give them the model and serial number of the iPhone and find out which cell carrier it is locked to. Then contact that cell carrier and see what the process is to officially unlock the iPhone and if you qualify.

  • How to return a record's column head given a record of a table.

    Hi:
    Do you know how to return a record's column head given a record of a table.
    For example, in a table with 3 columns "ID", "Education", "Age".
    Give you the record "Bachelor", how can you use a SQL to return the correspondent column head "Education"?
    Thanks for the big help.

    Have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html.
    import java.sql.*;
    import java.util.*;
    ResultSet rs = stmt.executeQuery("SELECT * FROM testTable");
    ResultSetMetaData rsmd = rs.getMetaData();
    // loop through rsmd.getColumnCount() {
         String columnName = getColumnName(i);
         // run a query SELECT * FROM testTable WHERE columnName='Bachelor'
         // if rs !=null return columnName and break out of the loop
    }

  • How to fix a bug after updating to 5.1.1 version for apple tv?

    How to fix a bug after updating to 5.1.1 version for apple tv?
    It stopped working freezing in the initial screen....
    Ihad alreadt tried to disconect the cables, the control everithing...

    How to fix a bug after updating to 5.1.1 version for apple tv?
    It stopped working freezing in the initial screen....
    Ihad alreadt tried to disconect the cables, the control everithing...

  • Tp return code 12 after update oracle from 9.2.0.4 to 9.2.0.8

    Hi
    tp return code 12 after update oracle from 9.2.0.4 to 9.2.0.8
    Please help me.
    Thank you

    Hi Maurizio,
    What does the transport logs says about the error?
    -Pinkle

  • After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer.

    After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer. The rainbow wheel was runnig 8 hrs and I turn off mac mini by power button, then I turn on mac mini with key Shift and p/w, checked HD. My HD has
    capacity 499.25 GB used 86.91GB. Is there a solution to fix this problem axcept the reinstall os?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.  
    These steps are to be taken while booted in safe mode.
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    for k in /Sy*/L*/Ex*/{,.?}*.kext; do test -f "$k/Contents/Info.plist" && /usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$_" | egrep -qv "apple|Accusys|ArcMSR|ATTO|CalDigit|HighPoint|hp-fax|JMicron|print|SoftRAID|stex" && echo $k; done | open -f -a TextEdit
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    sudo defaults read com.apple.loginwindow LoginHook | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3 
    Repeat with this line:
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 4
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null | open -f -a TextEdit 
    Remember, Steps 1-4 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • After updating to ios 7.1 with my iphone 4 my apps wont update it just loads then stop help please

    after updating to ios 7.1 with my iphone 4 my apps wont update it just loads then stop help please

    Reset your iPhone.  Hold the on/off and home buttons together for about 10 seconds till the Apple logo appears.
    If you continue to have issues, try downloading the apps to iTunes on your computer, then sync your iPhone using iTunes.

  • How can i use Itunes to update more than one IPad with more than one owner

    How can i use Itunes to update more than one IPad with more than one owner?  I own an IPad and my wife owns an IPad.  I want to use my system to update both IPads.  We have different Apple Accounts and different applications.  Is this possible?

    Of course, that is too easy.  I am such a bonehead.

  • After updating to the new ios5 with my 4S , no wifi connection (at home), problem when sending or receiving email

    After updating to the new ios5 with my 4S, no wifi connection and problem when sending or receiving email. I had no issue before the update... I am very disappointed

    Did you already try to reset your network settings in Settings/General/Reset?

  • Itunes can update that add search movies with subtitles in Russian (buy or rent)

    itunes can update that add search movies with subtitles in Russian (buy or rent)

    Did you find an answer?  I want the same information.  Thanks.

  • Servlet Database I/O: How to "lock" a record being updated ?

    Say you have a servlet that displays a list of customers in HTML page, and a button on each customer to click to bring up another page (servlet generated) with the customer info to edit. The customer info is in a database file (could be Access or ORACLE). User makes any changes and clicks a button to update the customer record (with a servlet).
    How do you prevent two users from editing the same customer record at the same time? I do not want to lock the whole file, just a record.
    Any pointers towards info about this subject appreciated.
    Walk Good

    sridharranganathan, does your technique assume that the read operation is locked, so that two users cannot obtain the same value of LockCounter?
    I have some questions relevant to the following code:
    public class theServlet extends HttpServlet
        public void doGet(HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
             Helper theHelper = new Helper();
             theHelper.setUser(req.getCookies);
             resp.setContentType("text/html");
                PrintWriter out = new PrintWriter(resp.getOutputStream());
                Connection con = null;
             try
                   SybDriver sybDriver = (SybDriver) Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                   sybDriver.setVersion(com.sybase.jdbcx.SybDriver.VERSION_5);
                   DriverManager.registerDriver(sybDriver);
                   con = DriverManager.getConnection("jdbc:sybase:Tds:dbsrv1:3520/hospcap", "myuserid", "mypassword");                 if (con != null) {
                  if(theHelper.getUserRecord(con, this)) {
                           //do some stuff
                        else { //do some other stuff }
                        con.close();
                 }catch(Exception e) { //whatever }
                 finally { out.flush(); }
             } //end doGet()
    } //end class
    public class Helper {
        private String user = "";
        private String field1Val= "";
        private String field2Val= "";
        public boolean setUser(Cookie [] cookies) {
         // method gets the user's userid from a cookie and then:
            user = user_id_from_cookie;
       public boolean getUserRecord(Connection con, theServlet serv){
            StringBuffer sb = new StringBuffer();
            Statement stmt = null;
         try {
             //Try to get the user's info:
                stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
             StringBuffer sql = new StringBuffer("SELECT field1, field2 FROM UserRecords WHERE user_id = '" + user + "'");
             ResultSet rs = stmt.executeQuery(sql.toString());
                rs.last();
                int nrows = rs.getRow();
                if(nrows < 1) { //user doesn't have an entry in the table yet.
                 //First, get result set of records with blank userids:
                 sql.replace(0, sql.length(), "SELECT * FROM UserRecords WHERE user_id = '' OR user_id = NULL ORDER BY field1");
              rs = stmt.executeQuery(sql.toString());
                    rs.last();
                    nrows = rs.getRow();
                 if(nrows > 0) {
                     //there ARE some records with null user_id, so assign this user to the first one:
                        rs.first();
                     field1Val = rs.getString("field1").trim();
                     field2Val = rs.getString("field2").trim();
                        //QUESTION: IS IT POSSIBLE THAT TWO USERS/THREADS HAVE THE SAME VALUE OF field1Val AT THIS POINT?
                     sql.replace(0, sql.length(), "UPDATE UserRecords SET user_id = '" + user + "' ");
                     sql.append(" WHERE field1 = '" + field1Val+ "' AND user_id is NULL");
                  con.setAutoCommit(false);
                  //Trying to use transaction isolation to prevent two users from updating the same record.
                  //Does this only work if the users share the connection, con?
                  int level = con.getTransactionIsolation();
                  try {
                      if(con.getMetaData().supportsTransactionIsolationLevel(con.TRANSACTION_READ_COMMITTED)) {
                          con.setTransactionIsolation(con.TRANSACTION_READ_COMMITTED);
                            //SYNCHRONIZE ON SERVLET INSTANCE?
                      //synchronized(serv){
                            nrows = stmt.executeUpdate(sql.toString());
                  }catch(SQLException se) {
                         con.rollback();
                         con.setAutoCommit(true);
                         con.setTransactionIsolation(level);
                         stmt.close();
                         return false;
                     con.commit();
                     con.setAutoCommit(true);
                     con.setTransactionIsolation(level);
                        if(nrows < 1) { //couldn't update the db.
                         stmt.close();
                         return false;
                     else {
                         stmt.close();
                         return true;
                 else { //There aren't any unused records; deal with it.
                     stmt.close();
                     return false;
                else { // the user has an entry in the table
                    rs.first(); //should only be one record for this userid.
                    field1Val = rs.getString("field1").trim();
                    field2Val = rs.getString("field2").trim();
                    stmt.close();
                 return true;
            }catch(SQLException se) {
             //some problem not caught elsewhere
             return false;
       } // end getUserRecord
    } // end class HelperI should say that the UserRecords table now contains about 5000 records (this will grow in increments of 5000), many of which have null user_id. If the value is not null, then it contains a userid. A user can have either zero or one entry in the table.
    Here are my questions regarding the above:
    1. In the servlet, each thread will have its own instance of Helper and of Connection, correct?
    2. I want to ensure that only one thread can update a particular UserRecords table record at a time. In the getUserRecord method, please note the line where field1Val is assigned, just above the capitalized QUESTION comment. Is it possible that two threads could have the same value of field1Val at the same time?
    3. When you set the transaction isolation level for connection1, does that prevent other threads that are using other connections to the database from accessing records being updated by the thread using connection1?
    4. As you can see, I am considering passing a reference to the servlet instance into the getUserRecords method and synchronizing the update statement on the servlet instance. Will that ensure only one thread at a time can update the record, without using the transaction isolation code?
    Thanks in advance for your answer.

  • How to Restore iTunes Library after update?

    Updated iMac to iTunes 11.0.5 and lost almost entire library of music (all but 3 songs). Tried to open iTunes with previous library but music I downloaded from CD's cannot be "located". Don't know how to find them. Tried to restore from back up external drive library, but those files are "locked" or I don't have permission. Purchased songs, with some exceptions, will play. Some don't though.
    My library was from an much older version of iTunes (2008 or 09), could that be an issue? I don't use this desktop much at all, but would like to have the library be functional.
    1.  How can I restore my library getting all songs to play?
    2.  Should I update iTunes on my Macbook? It's using 11.0.4 now. I don't want to mess up it's library as that's the one I use.

    Hi, Tluttrell. 
    Here is the best resource when experiencing issues with missing media after updating iTunes. 
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967
    Regards,
    Jason H. 

Maybe you are looking for

  • How to extend the extractor 0FC_BP_ITEMS?

    Hi everybody, Has anyone any information about extend the extractor 0FC_BP_ITEMS? Does it run with a tipical user exit? Thanks and regards! MML

  • Oracle Payables Witholding Tax Accounting Entries

    Can someone please confirm the accounting entries in regards to withholding tax in Oracle Payables. Are these correct? At the time of payment creation: DEBIT: ACCOUNTS PAYABLES $100 CREDIT: CASH $80 CREDIT: WITH-HOLDING TAX PAYABLE $20 When witholdin

  • E2 Compatibility with MacBook Pro

    Would like advice about impending change from PC to Mac. Currently running the Palm Desktop software that came with the E2 in 2005...should I convert to Outlook 2003 and then transfer to the Mac or am I better off downloading the Palm software for Ma

  • Creative Cloud/Adobe Installer won't connect to servers

    So, my free trial for Adobe Premiere Pro recently expired so I decided to invest in the program since I have a few school assignments to get done and so I had to go through the process of installing the creator cloud etc. but the thing is, even thoug

  • Unable to activate Adobe Acrobat 8

    Hello, I am unable to activate Adobe Acrobat 8 Professional, fully updated to 8.3.1 on two computers. Acrobat informs me that my computer is not connected to the internet, but it is. Phone activation does not work as the activation phoneline is no lo