Recordset Total

Has anyone ever had a problem with recordset totals?
I have a page that is fairly recordset heavy. If the
recordset has more
than 1 record then a select list is displayed, if not, then
just the
value of the single row is displayed.
This is with CS3 by the way.
Whenever I drag a new recordset total to the page to be used
in a
conditional the code that creates the recordset stats gets
overwritten
with the code for current recordset. This prevents my first
conditional
select from displaying.
I have tried recreating the new stats code but that hasn't
made any
difference for some reason. I think I must be missing
something
somewhere. Could it be because the page doesn't actually
display the
total, so when I create a new one Dreamweaver doesn't think
its needed
as it can't see it?
Anyone have any clever ideas?
Steve

If your JDBC driver allows it, and assuming your ResultSet is an instance variable:
private int getResultsCount() throws SQLException {
    _rs.last();
    int numResults = _rs.getRow();
    _rs.beforeFirst();
     return numResults;
}If your JDBC driver doesn't allow you to jump around in the result set like this, you can also populate a Vector with Objects that represent each record in your ResultSet, and then get the size() of that Vector. This has the advantages of allowing you to immediately close the ResultSet object once its data has been stored off into the Vector, since keeping ResultSet objects open while you use them can get messy in certain circumstances:
private Vector getResultsVector(ResultSet rs) {
    Vector resultsVector = new Vector();
    while(rs.next()) {
        String val1 = rs.getString(1);
        String val2 = rs.getString(2);
        String val3 = rs.getString(3);
        Foo myFoo = new Foo(val1, val2, val3);
        resultsVector.addElement(myFoo);
    return resultsVector;
}And lastly, you can always fire off a select count(*) query first which will just return a ResulSet with one row, namely the number of results the query will return. We used to do this, but we found it was more efficient to just issue the query and populate the Vector as described above. Good luck, and ALWAYS remember to close your ResultSets, PreparedStatements, and Connections!

Similar Messages

  • Spry:if - am I using it right?

    I am trying to use spry:if to decide which select to display:
    </div> 
            <div  spry:if="{title} == 'yes'"> Round:<select name="rounds">
                <option>Choose a round</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
                <option value="0">Distance</option>
    </select></div>
        <div spry:if="{title} != 'yes'"> Round:<select name="rounds">
                <option>Choose a round</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="0">Distance</option>
                </select></div>
    The problem is it is only working for the first 'title'='yes' in the dataset. All the others are being displayed as the second option.
    Thanks for reading.

    Link: bfdhockey.com/ufcpool(remove-this and brackets)2/main.php
    Here is the source code, I dont see an option for 'code' sorry if it is hard to read. Thanks for the help
    <?php
    session_start();
    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_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO picks (winner, round, won_by, fight_id, player_id, event_id) VALUES (%s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['winners'], "text"),
                           GetSQLValueString($_POST['rounds'], "int"),
                           GetSQLValueString($_POST['outcome'], "text"),
                           GetSQLValueString($_POST['fights'], "text"),
                           GetSQLValueString($_POST['player'], "text"),
                           GetSQLValueString($_POST['events'], "text"));
      mysql_select_db($database_ufcpool, $ufcpool);
      $Result1 = mysql_query($insertSQL, $ufcpool) or die(mysql_error());
      $insertGoTo = "picks_progress.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    if ((isset($_POST['pick_id'])) && ($_POST['pick_id'] != "")) {
      $deleteSQL = sprintf("DELETE FROM picks WHERE pick_id=%s",
                           GetSQLValueString($_POST['pick_id'], "int"));
      mysql_select_db($database_ufcpool, $ufcpool);
      $Result1 = mysql_query($deleteSQL, $ufcpool) or die(mysql_error());
      $deleteGoTo = "picks_progress.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
        $deleteGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $deleteGoTo));
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_events = "SELECT events.event_id, events.event_no FROM events WHERE events.event_date >= now()";
    $events = mysql_query($query_events, $ufcpool) or die(mysql_error());
    $row_events = mysql_fetch_assoc($events);
    $totalRows_events = mysql_num_rows($events);
    $colname_fights = "-1";
    if (isset($_POST['lookup_events'])) {
      $colname_fights = $_POST['lookup_events'];
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_fights = sprintf("SELECT concat(fa.first,' ',fa.last,' ', 'vs',' ',fb.first,' ',fb.last) as vs, fights.fight_id, fights.fight_no,events.event_no, events.event_id, fights.title FROM fights LEFT JOIN events on events.event_id=fights.event_id INNER JOIN fighters as fa ON fights.fighter_a=fa.fighter_id INNER JOIN fighters as fb ON fights.fighter_b=fb.fighter_id WHERE events.event_id = %s ORDER BY events.event_no,fights.fight_no ", GetSQLValueString($colname_fights, "text"));
    $fights = mysql_query($query_fights, $ufcpool) or die(mysql_error());
    $row_fights = mysql_fetch_assoc($fights);
    $totalRows_fights = mysql_num_rows($fights);
    $colname_winners = "-1";
    if (isset($_POST['lookup_fights'])) {
      $colname_winners = $_POST['lookup_fights'];
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_winners = sprintf("SELECT fighters.fighter_id, concat(fighters.first,' ',fighters.last) as name,fights.fight_id, fights.title FROM fighters INNER JOIN fights ON fighters.fighter_id = fights.fighter_a WHERE fight_id = %s  UNION SELECT fighters.fighter_id, concat(fighters.first,' ',fighters.last) as name,fights.fight_id,fights.title FROM fighters INNER JOIN fights ON fighters.fighter_id = fights.fighter_b WHERE fight_id = %s", GetSQLValueString($colname_winners, "int"),GetSQLValueString($colname_winners, "int"));
    $winners = mysql_query($query_winners, $ufcpool) or die(mysql_error());
    $row_winners = mysql_fetch_assoc($winners);
    $totalRows_winners = mysql_num_rows($winners);
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_rounds = "SELECT fights.title FROM fights";
    $rounds = mysql_query($query_rounds, $ufcpool) or die(mysql_error());
    $row_rounds = mysql_fetch_assoc($rounds);
    $totalRows_rounds = mysql_num_rows($rounds);
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_player = "SELECT players.name, players.player_id FROM players WHERE players.name='$_SESSION[MM_Username]'";
    $player = mysql_query($query_player, $ufcpool) or die(mysql_error());
    $row_player = mysql_fetch_assoc($player);
    $totalRows_player = mysql_num_rows($player);
    mysql_select_db($database_ufcpool, $ufcpool);
    $query_playerpicks = "SELECT picks.pick_id,events.event_no, events.event_id, events.event_date, fights.fight_no, concat(fa.first,' ',fa.last,' ','vs.',fb.first,' ',fb.last)as fight, concat(wf.first,' ',wf.last)as winner,case WHEN picks.round=0 THEN 'decision' ELSE picks.round END AS rounds, picks.won_by FROM events INNER JOIN fights ON fights.event_id=events.event_id INNER JOIN fighters as fa ON fights.fighter_a=fa.fighter_id INNER JOIN fighters as fb ON fights.fighter_b=fb.fighter_id LEFT JOIN picks ON fights.fight_id=picks.fight_id INNER JOIN players ON picks.player_id=players.player_id INNER JOIN fighters as wf ON picks.winner=wf.fighter_id WHERE players.name='$_SESSION[MM_Username]' ORDER BY events.event_no, fights.fight_no";
    $playerpicks = mysql_query($query_playerpicks, $ufcpool) or die(mysql_error());
    $row_playerpicks = mysql_fetch_assoc($playerpicks);
    $totalRows_playerpicks = mysql_num_rows($playerpicks);
    if (isset($_POST['lookup_events'])) {
        header("Content-type: text/xml");
        header("Pragma: public");
        header("Cache-control: private");
        header("Expires: -1");
        $export_fights="";
        if($export_fights=="1"){
            header("Content-Disposition: attachment; filename=recordset.xml");
            header("Content-Type: application/force-download");
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
        echo "<recordset total=\"".$totalRows_fights."\">";
        if($totalRows_fights > 0){
            $Start_Record = 0;
            $Num_Records = $totalRows_fights;
            $Current_Record = 0;
            if(isset($_POST['Start_Record']) && $_POST['Start_Record']!="" &&  isset($_POST['Num_Records']) && $_POST['Num_Records']!=""){
                $Start_Record = $_POST['Start_Record'];
                $Num_Records = $_POST['Num_Records'];
            if(isset($_GET['Start_Record']) && $_GET['Start_Record']!="" &&  isset($_GET['Num_Records']) && $_GET['Num_Records']!=""){
                $Start_Record = $_GET['Start_Record'];
                $Num_Records = $_GET['Num_Records'];
            $totalColumns=mysql_num_fields($fights);
            do{
                if($Current_Record>=$Start_Record){
                    echo "<record>";
                    for ($x=0; $x<$totalColumns; $x++) {
                        $field=mysql_field_name($fights, $x);
                        echo "<".$field."><"."![CD"."ATA[".$row_fights[$field]."]"."]></".$field.">";
                    echo "</record>";
                $Current_Record=$Current_Record+1;
                if($Current_Record-$Start_Record==$Num_Records){break;}
            }while ($row_fights = mysql_fetch_assoc($fights));
        echo "</recordset>";
        die();
    if (isset($_POST['lookup_fights'])) {
        header("Content-type: text/xml");
        header("Pragma: public");
        header("Cache-control: private");
        header("Expires: -1");
        $export_winners="";
        if($export_winners=="1"){
            header("Content-Disposition: attachment; filename=recordset.xml");
            header("Content-Type: application/force-download");
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
        echo "<recordset total=\"".$totalRows_winners."\">";
        if($totalRows_winners > 0){
            $Start_Record = 0;
            $Num_Records = $totalRows_winners;
            $Current_Record = 0;
            if(isset($_POST['Start_Record']) && $_POST['Start_Record']!="" &&  isset($_POST['Num_Records']) && $_POST['Num_Records']!=""){
                $Start_Record = $_POST['Start_Record'];
                $Num_Records = $_POST['Num_Records'];
            if(isset($_GET['Start_Record']) && $_GET['Start_Record']!="" &&  isset($_GET['Num_Records']) && $_GET['Num_Records']!=""){
                $Start_Record = $_GET['Start_Record'];
                $Num_Records = $_GET['Num_Records'];
            $totalColumns=mysql_num_fields($winners);
            do{
                if($Current_Record>=$Start_Record){
                    echo "<record>";
                    for ($x=0; $x<$totalColumns; $x++) {
                        $field=mysql_field_name($winners, $x);
                        echo "<".$field."><"."![CD"."ATA[".$row_winners[$field]."]"."]></".$field.">";
                    echo "</record>";
                $Current_Record=$Current_Record+1;
                if($Current_Record-$Start_Record==$Num_Records){break;}
            }while ($row_winners = mysql_fetch_assoc($winners));
        echo "</recordset>";
        die();
    ?>
    <!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" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <script src="../SpryAssets/SpryTooltip.js" type="text/javascript"></script>
    <script>
    function getDefaultfights(){
              document.search_fights_form.lookup_events.value=document.getElementById("events").value;
              document.search_fights_form.submit();
    </script>
    <script src="../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryDataUtils.js" type="text/javascript"></script>
    <script>
    function searchfights(events){
        if(events.value!=""){
              document.search_fights_form.lookup_events.value=events.value;
              document.search_fights_form.submit();
    var dsfights = new Spry.Data.XMLDataSet("picks_progress.php", "recordset/record");
    var dswinners = new Spry.Data.XMLDataSet("picks_progress.php", "recordset/record");
    var dstitle = new Spry.Data.XMLDataSet("spryeventlist.php", "root/row]");
    </script>
    <script>
    function searchwinners(fights){
        if(fights.value!=""){
              document.search_winners_form.lookup_fights.value=fights.value;
              document.search_winners_form.submit();
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Picks</title>
    <link href="twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    .container .content table {
        text-align: center;
    </style>
    <link href="../SpryAssets/SpryTooltip.css" rel="stylesheet" type="text/css" />
    </head>
    <body onload="getDefaultfights()">
    <div class="container">
      <div class="header"><a href="#"><img src="header.jpg" alt="Insert Logo Here" name="Insert_logo" width="960" height="100" id="Insert_logo" style="background: #C6D580; display:block;" /></a>
        <!-- end .header -->
      </div>
      <div class="sidebar1">
        <ul class="nav">
        <li><a href="main.php">Home</a></li>
          <li><a href="admin/admin.php">Admin</a></li>
          <li><a href="login.php">Make Picks</a></li>
          <li><a href="leaderboard.php">Leaderboard</a></li>
          <li><a href="register.php">Register</a></li>
           <li><a href="research.php">Research</a></li>
           <li><a href="player_picks.php">All Picks</a></li>
        </ul>
        <p> </p>
        <!-- end .sidebar1 -->
      </div>
      <div class="content">
        <p class="tableheader">Your Picks so far:</p>
          <table border="0" align="center">
          <tr class="tableheader">
            <td >Delete</td>
            <td>UFC #</td>
            <td>Fight #</td>
            <td>vs.</td>
            <td>winner</td>
            <td>round</td>
            <td>won_by</td>
          </tr>
          <?php do { ?>
            <tr class="tablebody">
              <td class="correctpick"><span id="sprytrigger1"><a href="delete_picks.php?pickid=<? echo urlencode("$row_playerpicks[pick_id]"); ?>">Delete</a></span></td>
              <td><?php echo $row_playerpicks['event_no']; ?></td>
              <td><?php echo $row_playerpicks['fight_no']; ?></td>
              <td class="leftcolumn"><?php echo $row_playerpicks['fight']; ?></td>
              <td class="leftcolumn"><?php echo $row_playerpicks['winner']; ?></td>
              <td><?php echo $row_playerpicks['rounds']; ?></td>
              <td><?php echo $row_playerpicks['won_by']; ?></td>
            </tr>
            <?php } while ($row_playerpicks = mysql_fetch_assoc($playerpicks)); ?>
        </table>
        <p class="tableheader"> <?php echo $_SESSION['MM_Username']; ?> Make your picks</p>
        <form id="form1" name="form1" method="post" action="<?php echo $editFormAction; ?>">
          <p>
            <label for="events"></label>
          </p>
          Your Name:<select name="player">
            <?php
    do { 
    ?>
            <option value="<?php echo $row_player['player_id']?>"><?php echo $row_player['name']?></option>
            <?php
    } while ($row_player = mysql_fetch_assoc($player));
      $rows = mysql_num_rows($player);
      if($rows > 0) {
          mysql_data_seek($player, 0);
          $row_player = mysql_fetch_assoc($player);
    ?>
          </select>
          Choose an event:
      <select id="events" name="events" onChange="searchfights(this)">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_events['event_id']?>"><?php echo $row_events['event_no']?></option>
        <?php
    } while ($row_events = mysql_fetch_assoc($events));
      $rows = mysql_num_rows($events);
      if($rows > 0) {
          mysql_data_seek($events, 0);
          $row_events = mysql_fetch_assoc($events);
    ?>
      </select>
            <label for="fights"></label>
          </p>
          <input type="hidden" name="MM_insert" value="form1" />
          <div spry:region="dsfights">
            Choose a fight:
              <select name="fights" id="fights" onChange="searchwinners(this)" spry:repeatchildren="dsfights">
              <option value="" spry:if="'{ds_RowID}'=='0'"></option>
              <option value="{fight_id}">{vs} </option>
            </select>
          </div>
          <div spry:region="dswinners">
            Choose your winner:
              <select name="winners" spry:repeatchildren="dswinners">
                <option value="{fighter_id}">{name} </option>
              </select>
            <div  spry:region="dswinners" spry:if="{dswinners::title} == 'yes'"> Round:<select name="rounds">
                <option>Choose a round</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
                <option value="0">Distance</option>
    </select>
        <div spry:if="{dswinners::title} == 'no'"> Round:<select name="rounds">
                <option>Choose a round</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="0">Distance</option>
                </select></div>
          Outcome:
    <select name="outcome" id="outcome">
      <option>Outcome of Fight</option>
            <option value="Submission">Submission</option>
            <option value="KO/TKO">KO/TKO</option>
            <option value="Decision">Decision</option>
      </select>
          <label for="select2"></label>
          </div>
            <input name="Submit Picks" type="submit" value="Submit" />
        </form>
    <!-- end .content -->
      </div>
      <div class="footer">
        <form id="form2" name="search_fights_form" method="post" action="">
          <input type="hidden" name="lookup_events" id="lookup_events" />
        </form>
        <p> </p>
        <!-- end .footer -->
      </div>
      <!-- end .container -->
    </div>
    <div class="tooltipContent" id="sprytooltip1">Delete is instant. You will have to repeat the pick you deleted.</div>
    <form id="search_winners_form" name="search_winners_form" method="post" action="">
      <input type="hidden" name="lookup_fights" id="lookup_fights" />
    </form>
    <p> </p>
    <script language="javascript" type="text/javascript">
    Spry.DataUtils.Search('search_fights_form','dsfights','form2','');
    </script>
    <script language="javascript" type="text/javascript">
    Spry.DataUtils.Search('search_winners_form','dswinners','search_winners_form','');
    </script>
    <script type="text/javascript">
    var sprytooltip1 = new Spry.Widget.Tooltip("sprytooltip1", "#sprytrigger1", {useEffect:"fade"});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($events);
    mysql_free_result($fights);
    mysql_free_result($winners);
    mysql_free_result($rounds);
    mysql_free_result($player);
    mysql_free_result($playerpicks);
    ?>

  • Total no of records in a recordset?

    I creating an application in which I send a query to database. Then loop through the ResultSet object and increment a counter to find the total no. of records in it, and then a generate JLabel array equal to the size of counter which is application's requirement. But it's not an effecient way. I looked in API for the ResultSet's methods but i didn't find any method which should return the total no. of records in a ResultSet object. any other way?

    Sir,
    No.There is no direct way. There wasn't last week. There wasn't last year. There isn't one now. There won't be next week.
    There are three ways to do it.
    1) You can call next through each row and increment a counter.
    2) You can jump to the last row and call getRow which will return you the row number of the last row aka the number of rows in the Result Set. (Note you need a scrollable cursor for this one. )
    3) You can make use of SQL COUNT. Either have a seperate query that is the same as your select but it returns COUNT instead of columns or use COUNT as a field you select. (Note this method will be fastest and should be the least resource intensive if you only want the count of rows but it can have problems if for example your query uses GROUP in which the COUNT will be something else then...)
    Sincerely,
    Slappy

  • Can't get total recordset

    Set Rec_cmd = Server.CreateObject ("ADODB.Command")
    Rec_cmd.ActiveConnection = MM_conndb_STRING
    Rec_cmd.CommandText = "SELECT * FROM tbl"
    Rec_cmd.Prepared = true
    Set Rec = Rec_cmd.Execute
    This is common DW Recordset soruce code, I am pretty sure there is over 10 datas in table
    but when I use Response.Write Rec.RecordCount, it's always response -1
    therefore move to next or previous page funcion will be failed, let alone some page navigation funciton
    my database was access, and this is my connection string
    MM_conndb_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\db\db.mdb")
    why can't I get recordset count?

    Hi,
    I haven't used Branch Aware(ness?) yet. Hmm..I will look into it. Thanks!  I'm using 7, so I'll have to check it out.
    Thanks for the quick response.
    Elizabeth

  • How to get an updatable ADODB Recordset from a Stored Procedure?

    In VB6 I have this code to get a disconnected ADODB Recordset from a Oracle 9i database (the Oracle Client is 10g):
    Dim conSQL As ADODB.Connection
    Dim comSQL As ADODB.Command
    Dim recSQL As ADODB.Recordset
    Set conSQL = New ADODB.Connection
    With conSQL
    .ConnectionString = "Provider=OraOLEDB.Oracle;Password=<pwd>;Persist Security Info=True;User ID=<uid>;Data Source=<dsn>"
    .CursorLocation = adUseClientBatch
    .Open
    End With
    Set comSQL = New ADODB.Command
    With comSQL
    .ActiveConnection = conSQL
    .CommandType = adCmdStoredProc
    .CommandText = "P_PARAM.GETALLPARAM"
    .Properties("PLSQLRSet").Value = True
    End With
    Set recSQL = New ADODB.Recordset
    With recSQL
    Set .Source = comSQL
    .CursorLocation = adUseClient
    .CursorType = adOpenStatic
    .LockType = adLockBatchOptimistic
    .Open
    .ActiveConnection = Nothing
    End With
    The PL/SQL Procedure is returning a REF CURSOR like this:
    PROCEDURE GetAllParam(op_PARAMRecCur IN OUT P_PARAM.PARAMRecCur)
    IS
    BEGIN
    OPEN op_PARAMRecCur FOR
    SELECT *
    FROM PARAM
    ORDER BY ANNPARAM DESC;
    END GetAllParam;
    When I try to update some values in the ADODB Recordset (still disconnected), I get the following error:
    Err.Description: Multiple-step operation generated errors. Check each status value.
    Err.Number: -2147217887 (80040E21)
    Err.Source: Microsoft Cursor Engine
    The following properties on the Command object doesn't change anything:
    .Properties("IRowsetChange") = True
    .Properties("Updatability") = 7
    How can I get an updatable ADODB Recordset from a Stored Procedure?

    4 years later...
    I was having then same problem.
    Finally, I've found how to "touch" the requierd bits.
    Obviously, it's hardcore, but since some stupid at microsoft cannot understand the use of a disconnected recordset in the real world, there is no other choice.
    Reference: http://download.microsoft.com/downlo...MS-ADTG%5D.pdf
    http://msdn.microsoft.com/en-us/library/cc221950.aspx
    http://www.xtremevbtalk.com/showthread.php?t=165799
    Solution (VB6):
    <pre>
    Dim Rst As Recordset
    Rst.Open "select 1 as C1, '5CHARS' as C5, sysdate as C6, NVL(null,15) as C7, null as C8 from DUAL", yourconnection, adOpenKeyset, adLockBatchOptimistic
    Set Rst.ActiveConnection = Nothing
    Dim S As New ADODB.Stream
    Rst.Save S, adPersistADTG
    Rst.Close
    Set Rst = Nothing
    With S
    'Debug.Print .Size
    Dim Bytes() As Byte
    Dim WordVal As Integer
    Dim LongVal As Long
    Bytes = .Read(2)
    If Bytes(0) <> 1 Then Err.Raise 5, , "ADTG byte 0, se esperaba: 1 (header)"
    .Position = 2 + Bytes(1)
    Bytes = .Read(3)
    If Bytes(0) <> 2 Then Err.Raise 5, , "ADTG byte 9, se esperaba: 2 (handler)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' handler size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 3 Then Err.Raise 5, , "ADTG, se esperaba: 3 (result descriptor)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' result descriptor size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 16 Then Err.Raise 5, , "ADTG, se esperaba: 16 (adtgRecordSetContext)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' token size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 5 Then Err.Raise 5, , "ADTG, se esperaba: 5 (adtgTableDescriptor)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' token size
    .Position = .Position + LongVal
    Bytes = .Read(1)
    If Bytes(0) <> 6 Then Err.Raise 5, , "ADTG, se esperaba: 6 (adtgTokenColumnDescriptor)"
    Do ' For each Field
    Bytes = .Read(2)
    LongVal = Bytes(0) + Bytes(1) * 256 ' token size
    Dim NextTokenPos As Long
    NextTokenPos = .Position + LongVal
    Dim PresenceMap As Long
    Bytes = .Read(3)
    PresenceMap = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(2)), 2))
    Bytes = .Read(2) 'ColumnOrdinal
    'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
    'Aca pueden venir: friendly_columnname, basetable_ordinal,basetab_column_ordinal,basetab_colname
    If PresenceMap And &H800000 Then 'friendly_columnname
    Bytes = .Read(2) 'Size
    LongVal = Bytes(0) + Bytes(1) * 256 ' Size
    .Position = .Position + LongVal * 2 '*2 debido a UNICODE
    End If
    If PresenceMap And &H400000 Then 'basetable_ordinal
    .Position = .Position + 2 ' 2 bytes
    End If
    If PresenceMap And &H200000 Then 'basetab_column_ordinal
    .Position = .Position + 2 ' 2 bytes
    End If
    If PresenceMap And &H100000 Then 'basetab_colname
    Bytes = .Read(2) 'Size
    LongVal = Bytes(0) + Bytes(1) * 256 ' Size
    .Position = .Position + LongVal * 2 '*2 debido a UNICODE
    End If
    Bytes = .Read(2) 'adtgColumnDBType
    'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
    Bytes = .Read(4) 'adtgColumnMaxLength
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Bytes = .Read(4) 'Precision
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Bytes = .Read(4) 'Scale
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Dim ColumnFlags() As Byte, NewFlag0 As Byte
    ColumnFlags = .Read(1) 'DBCOLUMNFLAGS, First Byte only (DBCOLUMNFLAGS=4 bytes total)
    NewFlag0 = ColumnFlags(0)
    If (NewFlag0 And &H4) = 0 Then 'DBCOLUMNFLAGS_WRITE (bit 2) esta OFF
    'Lo pongo en ON, ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
    NewFlag0 = (NewFlag0 Or &H4)
    End If
    If (NewFlag0 And &H8) <> 0 Then 'DBCOLUMNFLAGS_WRITEUNKNOWN (bit 3) esta ON
    'Lo pongo en OFF, ya que no me importa si NO sabes si se puede updatear no, yo lo se, no te preocupes
    'ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
    NewFlag0 = (NewFlag0 And Not &H8)
    End If
    If (NewFlag0 And &H20) <> 0 Then 'DBCOLUMNFLAGS_ISNULLABLE (bit 5) esta OFF
    'Lo pongo en ON, ya que siendo un RST DESCONECTADO, si le quiero poner NULL, le pongo y listo
    NewFlag0 = (NewFlag0 Or &H20)
    End If
    If NewFlag0 <> ColumnFlags(0) Then
    ColumnFlags(0) = NewFlag0
    .Position = .Position - 1
    .Write ColumnFlags
    End If
    .Position = NextTokenPos
    Bytes = .Read(1)
    Loop While Bytes(0) = 6
    'Reconstruyo el Rst desde el stream
    S.Position = 0
    Set Rst = New Recordset
    Rst.Open S
    End With
    'TEST IT
    On Error Resume Next
    Rst!C1 = 15
    Rst!C5 = "MUCHOS CHARS"
    Rst!C7 = 23423
    If Err.Number = 0 Then
    MsgBox "OK"
    Else
    MsgBox Err.Description
    End If
    </pre>

  • How do I get a recordset to display three images horizontally?

    Hi,
    I'm using DWCS3 with MAMP.
    I want to display three images horizontally in a recordset. I have downloaded Tom Muck's extension horizontal looper and followed the instructions.
    However when I tried to add the recordset navigation bar I ran into some problems.
    If I add a repeat region to Tom Muck's extension then the page doesn't load.
    If I don't add a repeat region to Tom's extension everything works really well except only one image displays rather than three.
    Here is all of my code for the page. 
    Could someone help me please.
    <?php require_once('Connections/connQuery.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $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;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_rshlimgs = 1;
    $pageNum_rshlimgs = 0;
    if (isset($_GET['pageNum_rshlimgs'])) {
      $pageNum_rshlimgs = $_GET['pageNum_rshlimgs'];
    $startRow_rshlimgs = $pageNum_rshlimgs * $maxRows_rshlimgs;
    mysql_select_db($database_connQuery, $connQuery);
    $query_rshlimgs = "SELECT * FROM image";
    $query_limit_rshlimgs = sprintf("%s LIMIT %d, %d", $query_rshlimgs, $startRow_rshlimgs, $maxRows_rshlimgs);
    $rshlimgs = mysql_query($query_limit_rshlimgs, $connQuery) or die(mysql_error());
    $row_rshlimgs = mysql_fetch_assoc($rshlimgs);
    if (isset($_GET['totalRows_rshlimgs'])) {
      $totalRows_rshlimgs = $_GET['totalRows_rshlimgs'];
    } else {
      $all_rshlimgs = mysql_query($query_rshlimgs);
      $totalRows_rshlimgs = mysql_num_rows($all_rshlimgs);
    $totalPages_rshlimgs = ceil($totalRows_rshlimgs/$maxRows_rshlimgs)-1;
    $queryString_rshlimgs = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rshlimgs") == false &&
            stristr($param, "totalRows_rshlimgs") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rshlimgs = "&" . htmlentities(implode("&", $newParams));
    $queryString_rshlimgs = sprintf("&totalRows_rshlimgs=%d%s", $totalRows_rshlimgs, $queryString_rshlimgs);
    ?><!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <link href="styles/orderlist3.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="lightbox_assets/css/lightbox.css" type="text/css" media="screen" />
    <script src="lightbox_assets/js/prototype.js" type="text/javascript"></script>
    <script src="lightbox_assets/js/scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="lightbox_assets/js/lightbox.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    a:link {
    color: #999966;
    a:visited {
    color: #FFFFFF;
    a:hover {
    color: #006600;
    a:active {
    color: #666699;
    -->
    </style></head>
    <body class="oneColFixCtrHdr" onload="initLightbox()">
    <div id="container">
      <div id="header">
        <h1>Header</h1>
      <!-- end #header --></div>
      <div id="mainContent">
        <h3>Image catalog</h3>
        <p> </p>
        <table >
          <tr>
            <?php
    $rshlimgs_endRow = 0;
    $rshlimgs_columns = 3; // number of columns
    $rshlimgs_hloopRow1 = 0; // first row flag
    do {
        if($rshlimgs_endRow == 0  && $rshlimgs_hloopRow1++ != 0) echo "<tr>";
       ?>
            <td><p><a href="images/weddingprivate/mr_and_mrs_lowe_18_15.jpg" title="Mr and Mrs Lowe_18_15" rel="lightbox"><img src="<?php echo $row_rshlimgs['imagethumb_url']; ?>" alt="The bride to be getting ready" longdesc="http://The bride to be with her hairdresser" width="100" height="150" /></a></p>
                <p><?php echo $row_rshlimgs['caption']; ?> <img src="images/Untitled-1.gif" alt="spacer" width="170" height="1" /></p>
              <p> </p>
              <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                  <input type="hidden" name="cmd" value="_s-xclick" />
                  <input type="hidden" name="hosted_button_id" value="6782561" />
                  <table>
                    <tr>
                      <td><input type="hidden" name="on0" value="Sizes" />
                        Sizes</td>
                    </tr>
                    <tr>
                      <td><select name="os0">
                          <option value="6x4">6x4 £3.00 </option>
                          <option value="7x5">7x5 £5.00 </option>
                          <option value="12x8">12x8 £6.50 </option>
                        </select>
                      </td>
                    </tr>
                  </table>
                <input type="hidden" name="currency_code" value="GBP" />
                  <input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
                  <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
              </form></td>
            <?php  $rshlimgs_endRow++;
    if($rshlimgs_endRow >= $rshlimgs_columns) {
      ?>
          </tr>
    <?php
    $rshlimgs_endRow = 0;
    } while ($row_rshlimgs = mysql_fetch_assoc($rshlimgs));
    if($rshlimgs_endRow != 0) {
    while ($rshlimgs_endRow < $rshlimgs_columns) {
        echo("<td> </td>");
        $rshlimgs_endRow++;
    echo("</tr>");
    }?>
        </table>
        <table border="0">
          <tr>
            <td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, 0, $queryString_rshlimgs); ?>"><img src="images/First.gif" border="0" /></a>
                  <?php } // Show if not first page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, max(0, $pageNum_rshlimgs - 1), $queryString_rshlimgs); ?>"><img src="images/Previous.gif" border="0" /></a>
                  <?php } // Show if not first page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, min($totalPages_rshlimgs, $pageNum_rshlimgs + 1), $queryString_rshlimgs); ?>"><img src="images/Next.gif" border="0" /></a>
                  <?php } // Show if not last page ?>
            </td>
            <td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
                  <a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, $totalPages_rshlimgs, $queryString_rshlimgs); ?>"><img src="images/Last.gif" border="0" /></a>
                  <?php } // Show if not last page ?>
            </td>
          </tr>
        </table>
        <p> </p>
            <p> </p>
      <!-- end #mainContent --></div>
      <div id="footer">
        <p>Footer</p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>
    <?php
    mysql_free_result($rshlimgs);
    ?>

    Hi Charles,
    Use [Dr%] Variable formula as =if(IsNull([Dr%]);0;[DR%])
    Here IsNull returns the Boolean value of variable [Dr%] if its true then inserts 0 else the percentage values of failed tests based on the  total number of assembly tests performed.
    I Hope this is what you want to achieve....
    Thanks....
    Pratik

  • Sender File adapter - Message per recordset

    Hi All,
    I have a scenario in where I have to split a large file (txt) into smaller files and then process them in PI.
    Normally I use FCC and message per recordset... It splits all messages and everything is ok.
    BUT, now I have to split the messages at specific key points. I cannot split it by a static number. It may vary. It is totally dynamic.
    So I want to use the adapter module to write my own code to split the message when I need to. but how?
    When using the FCC the messages get split before they even arrive at my adapter module. So is it possible to split them manually using adapter module???
    Thanks.

    Hi Chris,
    These are my thoughts on this issue. 40 MB (larger file) need to be split into small files (according to your requirement, at dynamic key points).
    You can split large file using OS script, but it cannot be monitored using SAP PI infrastructure. I think you are considering writing an adapter module. So, I assume your PI system can handle that large file (40 MB) in memory. My opinion is, do not go with adapter module, as it is difficult to code, maintain and memory intensive. Try to create another new scenario, which picks up this large file, splits it into small pieces and place these small files in folder, from where current scenario picks up files. In new scenario, use Java Mapping (as input in not XML, we cannot use Graphical, XSLT) to split the payload at dynamic key points using OutputAttachments http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/OutputAttachments.html .
    Hi All,
    I have seen messages with multiple attachments which were processed in SAP PI (I have seen multiple attachments in SXI_MONITOR). I have not tried using OutputAttachments http://help.sap.com/javadocs/pi/SP3/xpi/index.html . Please let me know, whether we can generate multiple files from multiple attachments and place them in target directory using receiver file channel?
    Regards,
    Raghu_Vamsee

  • Requery Recordset

    I have another issue with my summary/update processing. I have a form where members can list themselves for either needing or wanting boat/crew/housing. Below the form is a listing of all associated requests:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../../Connections/ilcaData.asp" -->
    <!--#include file="../../Connections/eventCalendar.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
      If condition = "" Then
        MM_IIf = ifFalse
      Else
        MM_IIf = ifTrue
      End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "needavailadd") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
        MM_editCmd.CommandText = "INSERT INTO needAvail (naType, memName, city, [state], phone, email, info, eventID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("naType")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 32, Request.Form("memName")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 18, Request.Form("city")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 2, Request.Form("state")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 12, Request.Form("phone")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 48, Request.Form("email")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 75, Request.Form("info")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 5, 1, -1, MM_IIF(Request.Form("eventID"), Request.Form("eventID"), null)) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl
        MM_editRedirectUrl = "eventneedavail.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    Dim rsStates
    Dim rsStates_cmd
    Dim rsStates_numRows
    Set rsStates_cmd = Server.CreateObject ("ADODB.Command")
    rsStates_cmd.ActiveConnection = MM_ilcaData_STRING
    rsStates_cmd.CommandText = "SELECT * FROM stateCodes"
    rsStates_cmd.Prepared = true
    Set rsStates = rsStates_cmd.Execute
    rsStates_numRows = 0
    %>
    <%
    Dim rsneedavailReq
    Dim rsneedavailReq_cmd
    Dim rsneedavailReq_numRows
    Set rsneedavailReq_cmd = Server.CreateObject ("ADODB.Command")
    rsneedavailReq_cmd.ActiveConnection = MM_eventCalendar_STRING
    rsneedavailReq_cmd.CommandText = "SELECT * FROM needAvailReq"
    rsneedavailReq_cmd.Prepared = true
    Set rsneedavailReq = rsneedavailReq_cmd.Execute
    rsneedavailReq_numRows = 0
    %>
    <%
    Dim rsneedAvail__MMColParam
    rsneedAvail__MMColParam = "0"
    If (Request.Querystring("ID")  <> "") Then
      rsneedAvail__MMColParam = Request.Querystring("ID")
    End If
    %>
    <%
    Dim rsneedAvail
    Dim rsneedAvail_cmd
    Dim rsneedAvail_numRows
    Set rsneedAvail_cmd = Server.CreateObject ("ADODB.Command")
    rsneedAvail_cmd.ActiveConnection = MM_eventCalendar_STRING
    rsneedAvail_cmd.CommandText = "SELECT * FROM eventneedAvail WHERE eventID = ?"
    rsneedAvail_cmd.Prepared = true
    rsneedAvail_cmd.Parameters.Append rsneedAvail_cmd.CreateParameter("param1", 5, 1, -1, rsneedAvail__MMColParam) ' adDouble
    Set rsneedAvail = rsneedAvail_cmd.Execute
    rsneedAvail_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = -1
    Repeat1__index = 0
    rsneedAvail_numRows = rsneedAvail_numRows + Repeat1__numRows
    %>
    <!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">
    <!-- InstanceBegin template="/Templates/mainLayout.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Welcome to the International Lightning Class</title>
    <meta name="Keywords" content="Lightning, lightning sailboat, lightning class, international lightning class, lightning class sailboat, lightning class association" />
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="../../assets/favicon.ico" rel="shortcut icon" />
    <link href="../../css/mainLayout2.css" rel="stylesheet" type="text/css" />
    <link href="../../css/navMenu.css" rel="stylesheet" type="text/css" />
    <link href="../../css/ilcaStyles.css" rel="stylesheet" type="text/css" />
    <link href="../../css/document.css" rel="stylesheet" type="text/css" />
    <script src="../../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <!-- InstanceBeginEditable name="styles" -->
    <link href="../../css/needAvail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    //-->
    </script>
    <!-- InstanceEndEditable -->
    <!-- InstanceParam name="setdatetype" type="text" value="" -->
    <!-- InstanceParam name="cleanup" type="text" value="" -->
    </head>
    <body onload="" onunload="">
    <%
    Response.Buffer = True
    If (Request.ServerVariables("HTTPS") = "on") Then
        Dim xredir__, xqstr__
        xredir__ = "http://" & Request.ServerVariables("SERVER_NAME") & _
                   Request.ServerVariables("SCRIPT_NAME")
        xqstr__ = Request.ServerVariables("QUERY_STRING")
        if xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
        Response.redirect xredir__
    End if
    %>
    <div id="wrapper">
      <div id="header">
        <div id="hdrLink"><a href="../../index.asp"><img src="../../assets/images/mainTemplate/headerImg.png" width="839" height="183" border="0" /></a></div>
      </div>
      <div id="sidebar">
        <div id="navigation">
          <!-- menu script itself. you should not modify this file -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu.js"></script>
          <!-- items structure. menu hierarchy and links are stored there -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_items.js"></script>
          <!-- files with geometry and styles structures -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_tpl2.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_tpl.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_tpl.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_tpl.js"></script>
          <script type="text/javascript" language="javascript">
    <!--//
    // Make sure the menu initialization is right above the closing &lt;/body&gt; tag
    // Moving it inside other tags will not affect the position of the menu on
    // the page. If you need this feature please consider Tigra Menu GOLD.
    // each menu gets two parameters (see demo files)
    // 1. items structure
    // 2. geometry structure
    new menu (MENU_ITEMS, MENU_TPL);
    // If you don't see the menu then check JavaScript console of the browser for the error messages
    // "Variable is not defined" error indicates that there's syntax error in that variable's definition
    // or the file with that variable isn't properly linked to the HTML document
    //-->
    </script>
        </div>
        <div id="sbar-image3"> <a href="http://www.facebook.com/pages/International-Lightning-Class-Association/197584991571" target="_blank"><img src="../../assets/images/mainTemplate/facebook.png" alt="Facebook ILCA link" width="36" height="36" border="0" /></a>  <a href="http://twitter.com/IntLightning" target="_blank"><img src="../../assets/images/mainTemplate/twitter.png" alt="Twitter ILCA link" width="36" height="36" border="0" /></a> Connect with us</span></span></span> <br />
        </div>
        <div id="sbarSearch">
          <!-- SiteSearch Google -->
          <FORM method=GET action="http://www.google.com/search">
            <input type=hidden name=ie value=UTF-8>
            <input type=hidden name=oe value=UTF-8>
            <TABLE width="126" align="center" bgcolor="#FFFFFF">
              <tr>
                <td width="135"><img src="../../assets/images/mainTemplate/google.jpg" width="68" height="21" alt="Google logo" /></td>
              </tr>
              <tr>
                <td><input type=text name=q size=20 maxlength=255 value="" />
                  <input type=submit name=btnG value="Google Search" />
                  <font size=-2>
                  <input type=hidden name=domains value="www.lightningclass.org">
                  <br>
                  <input type=radio
    name=sitesearch value="">
                  Web
                  <input type=radio name=sitesearch value="www.lightningclass.org" checked>
                  Site<br>
                  </font></td>
              </tr>
            </TABLE>
          </FORM>
          <!-- SiteSearch Google -->
        </div>
        <div id="sbarTranslate">
          <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up _source_language=en&w=148&h=60&title=&border=&output=js"></script>
        </div>
        <div id="sbar-image1"><a href="http://www.guadalajara2011.org.mx/esp/01_inicio/index.asp"><img src="../../assets/images/mainTemplate/panAm.jpg" width="116" height="129" border="0" /></a></div>
        <div id="sbar-image2"><a href="../../membership/joinRenew/membershipOptions.asp"><img src="../../assets/images/mainTemplate/joinILCA.png" alt="Join the ILCA" width="113" height="113" border="0" /></a></div>
      </div>
      <div id="background">
        <div id="mainContent"> <!-- InstanceBeginEditable name="mainContent" -->
          <div id="docHdr"> Header </div>
          <div id="docBody">
            <div id="listMe">
              <form ACTION="<%=MM_editAction%>" METHOD="POST" name="needavailadd">
                <fieldset id="needavailAdd" name="needavailAdd">
                  <legend class="legend">Logistics-Add</legend>
                  <br />
                  <label for="naType">Request Type:</label>
                  <label>
                    <select name="naType" size="1" id="naType" tabindex="1">
                      <option value="Sel" <%If (Not isNull(" Select a request type")) Then If ("Sel" = CStr(" Select a request type")) Then Response.Write("selected=""selected""") : Response.Write("")%>> Select a request type</option>
                      <%
    While (NOT rsneedavailReq.EOF)
    %>
                      <option value="<%=(rsneedavailReq.Fields.Item("requestKey").Value)%>" <%If (Not isNull(" Select a request type")) Then If (CStr(rsneedavailReq.Fields.Item("requestKey").Value) = CStr(" Select a request type")) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsneedavailReq.Fields.Item("requestType").Value)%></option>
                      <%
      rsneedavailReq.MoveNext()
    Wend
    If (rsneedavailReq.CursorType > 0) Then
      rsneedavailReq.MoveFirst
    Else
      rsneedavailReq.Requery
    End If
    %>
                    </select>
                  </label>
                  <br />
                  <br />
                  <label>First and Last Name:
                    <input name="memName" type="text" id="memName" tabindex="2" onblur="MM_validateForm('memName','','R');return document.MM_returnValue" />
                  </label>
                  <br />
                  <br />
                  <label>City:
                    <input name="city" type="text" id="city" tabindex="3" onblur="MM_validateForm('city','','R');return document.MM_returnValue" />
                  </label>
                  <label>State: </label>
                  <label>
                    <select name="state" size="1" id="state" tabindex="4" onchange="MM_validateForm('phone','','NisNum');MM_validateForm('email','','NisEmail');ret urn document.MM_returnValue">
                      <option value="Sel" <%If (Not isNull(" Select a state")) Then If ("Sel" = CStr(" Select a state")) Then Response.Write("selected=""selected""") : Response.Write("")%>> Select a state</option>
                      <%
    While (NOT rsStates.EOF)
    %>
                      <option value="<%=(rsStates.Fields.Item("stateCode").Value)%>" <%If (Not isNull(" Select a state")) Then If (CStr(rsStates.Fields.Item("stateCode").Value) = CStr(" Select a state")) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsStates.Fields.Item("stateName").Value)%></option>
                      <%
      rsStates.MoveNext()
    Wend
    If (rsStates.CursorType > 0) Then
      rsStates.MoveFirst
    Else
      rsStates.Requery
    End If
    %>
                    </select>
                  </label>
                  <br />
                  <br />
                  <label>Telephone#:
                    <input type="text" name="phone" id="phone" tabindex="5" />
                  </label>
                  <br />
                  <br />
                  <label>Email:
                    <input name="email" type="text" id="email" tabindex="6" size="48" maxlength="48" />
                  </label>
                  <br />
                  <br />
                  <label>Additional Information:
                    <input name="info" type="text" id="info" tabindex="7" size="58" maxlength="255" />
                  </label>
                  <br />
                  <br />
                  <input type="submit" name="addButton" id="addButton" value="Add Me" tabindex="8" />
                  <input type="reset" name="reset" id="reset" value="Reset" />
                </fieldset>
                <input name="eventID" type="hidden" id="eventID" value="<%=Request.QueryString("ID")%>" />
                <input type="hidden" name="MM_insert" value="needavailadd" />
              </form>
            </div>
            <div id="nameList">
              <table width=640 align=left>
                <% if rsneedAvail.EOF then
       response.write "<strong>No Requests Yet</strong>"
      else
      response.write "<strong>" & (rsneedAvail_total) & "</strong>"
      response.write "<strong> Logistics Requests:</strong>"%>
              <p align="left"> </p>
              <% icat = rsneedAvail.Fields.Item("requestType").Value %>
                <tr>
                  <td colspan='2' class="eventMonths"><%=(rsneedAvail.Fields.Item("requestType").Value)%></td>
                </tr>
                <tr>
                  <td colspan='2'><hr width=250% align="center"/></td>
                </tr>
         <%rsneedAvail.Requery%>
                <% While ((Repeat1__numRows <> 0) AND (NOT rsneedAvail.EOF)) %>
                  <% If rsneedAvail.Fields.Item("requestType").Value <> icat then
        icat = rsneedAvail.Fields.Item("requestType").Value%>
                  <tr height="20">
                    <td colspan='2'></td>
                  </tr>
                  <tr>
                    <td colspan='2' class="eventMonths"><%=(rsneedAvail.Fields.Item("requestType").Value)%></td>
                  </tr>
                  <tr>
                    <td colspan='2'><hr width=250% align="center"/></td>
                  </tr>
                  <%End If %>
                  <tr>
                    <td width="165"><%=(rsneedAvail.Fields.Item("name").Value)%></td>
                    <td width="150"><%=(rsneedAvail.Fields.Item("location").Value)%></td>
                    <td width="100"><%=(rsneedAvail.Fields.Item("phone").Value)%></td>
                    <td width="265"><%=(rsneedAvail.Fields.Item("info").Value)%></td>
                    <td width="30" class="hpResults" aligm="left"><div align="center"><a href="eventneedavailUpdate.asp?ID=<%=(rsneedAvail.Fields.Item("recID").Value)%>"><span class="eventeditLink">Edit</span></a></div></td>
                    <td width="30" class="hpResults" aligm="left"><div align="center"><a href="eventupdateLogin.asp?ID=<%=(rsneedAvail.Fields.Item("recID").Value)%>"><span class="eventeditLink">Delete</span></a></div></td>
                  </tr>
                  <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rsneedAvail.MoveNext()
    Wend
            end if
            %>
              </table>
            </div>
          </div>
          <!-- InstanceEndEditable --></div>
      </div>
      <div id="clear"></div>
      <div id="footer">
        <p><u><a href="../../membership/joinRenew/membershipOptions.asp" class="ftrLinks">Membership</a></u> | <u><a href="eventSelect.asp" class="ftrLinks">Racing</a></u> | <u><a href="../../classRules/documents/ilcaBylaws.asp" class="ftrLinks">Class Rules</a></u> | <u><a href="../../photoGallery/photos2008/index.asp" class="ftrLinks">Photo Gallery</a></u> | <u class="ftrLinks"><a href="../../marketplace/store/index.asp">Marketplace</a></u> | <u><a href="../../contacts/index.asp" class="ftrLinks">Contacts</a></u> | <u class="ftrLinks"><a href="../../siteMap.asp">Site Map</a></u><br />
          All Rights Reserved—International Lightning Class Association<br />
          <u><a href="mailto:[email protected]" class="ftrLinks">[email protected]</a></u><br />
          1528 Big Bass Drive, Tarpon Springs, Florida  34689— Phone: 727-942-7969 — Fax: 727-942-0173 — Skype: ilcaoffice</p>
      </div>
    </div>
    </body>
    <!-- InstanceEnd -->
    </html>
    <%
    rsStates.Close()
    Set rsStates = Nothing
    %>
    <%
    rsneedavailReq.Close()
    Set rsneedavailReq = Nothing
    %>
    <%
    rsneedAvail.Close()
    Set rsneedAvail = Nothing
    %>
    Entries may be updated. After the update, the page above is displayed. Sometimes the updated information displays, but more often it does not (????). I have tried a requery, but that is not working. How do I requery the recordset so that the current information always displays?
    Update page:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../../Connections/ilcaData.asp" -->
    <!--#include file="../../Connections/eventCalendar.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
      If condition = "" Then
        MM_IIf = ifFalse
      Else
        MM_IIf = ifTrue
      End If
    End Function
    %>
    <%
    If (CStr(Request("MM_update")) = "needavailUpdate") Then
      If (Not MM_abortEdit) Then
        ' execute the update
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
        MM_editCmd.CommandText = "UPDATE needAvail SET naType = ?, memName = ?, city = ?, [state] = ?, phone = ?, email = ?, info = ? WHERE recID = ?"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("naType")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 32, Request.Form("memName")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 18, Request.Form("city")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 2, Request.Form("state")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 12, Request.Form("phone")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 48, Request.Form("email")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 75, Request.Form("info")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl
        MM_editRedirectUrl = "eventneedavail.asp?ID=" & Request.Form("eventID")
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl
          Else
            MM_editRedirectUrl = MM_editRedirectUrl
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    Dim rsStates
    Dim rsStates_cmd
    Dim rsStates_numRows
    Set rsStates_cmd = Server.CreateObject ("ADODB.Command")
    rsStates_cmd.ActiveConnection = MM_ilcaData_STRING
    rsStates_cmd.CommandText = "SELECT * FROM stateCodes"
    rsStates_cmd.Prepared = true
    Set rsStates = rsStates_cmd.Execute
    rsStates_numRows = 0
    %>
    <%
    Dim rsneedavailReq
    Dim rsneedavailReq_cmd
    Dim rsneedavailReq_numRows
    Set rsneedavailReq_cmd = Server.CreateObject ("ADODB.Command")
    rsneedavailReq_cmd.ActiveConnection = MM_eventCalendar_STRING
    rsneedavailReq_cmd.CommandText = "SELECT * FROM needavailReq"
    rsneedavailReq_cmd.Prepared = true
    Set rsneedavailReq = rsneedavailReq_cmd.Execute
    rsneedavailReq_numRows = 0
    %>
    <%
    Dim rsneedAvail__MMColParam
    rsneedAvail__MMColParam = "0"
    If (Request.QueryString("ID")  <> "") Then
      rsneedAvail__MMColParam = Request.QueryString("ID")
    End If
    %>
    <%
    Dim rsneedAvail
    Dim rsneedAvail_cmd
    Dim rsneedAvail_numRows
    Set rsneedAvail_cmd = Server.CreateObject ("ADODB.Command")
    rsneedAvail_cmd.ActiveConnection = MM_eventCalendar_STRING
    rsneedAvail_cmd.CommandText = "SELECT * FROM needAvail WHERE recID = ?"
    rsneedAvail_cmd.Prepared = true
    rsneedAvail_cmd.Parameters.Append rsneedAvail_cmd.CreateParameter("param1", 5, 1, -1, rsneedAvail__MMColParam) ' adDouble
    Set rsneedAvail = rsneedAvail_cmd.Execute
    rsneedAvail_numRows = 0
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth
    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem
    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
      MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If
    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""
    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
      End If
    Next
    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
      End If
    Next
    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
      MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "")  Then
      MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
      MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If
    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
      If (firstItem <> "") Then
        MM_joinChar = "&"
      Else
        MM_joinChar = ""
      End If
    End Function
    %>
    <!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"><!-- InstanceBegin template="/Templates/mainLayout.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Welcome to the International Lightning Class</title>
    <meta name="Keywords" content="Lightning, lightning sailboat, lightning class, international lightning class, lightning class sailboat, lightning class association" />
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="../../assets/favicon.ico" rel="shortcut icon" />
    <link href="../../css/mainLayout2.css" rel="stylesheet" type="text/css" />
    <link href="../../css/navMenu.css" rel="stylesheet" type="text/css" />
    <link href="../../css/ilcaStyles.css" rel="stylesheet" type="text/css" />
    <link href="../../css/document.css" rel="stylesheet" type="text/css" />
    <script src="../../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <!-- InstanceBeginEditable name="styles" -->
    <link href="../../css/needAvail.css" rel="stylesheet" type="text/css" />
    <!-- InstanceEndEditable -->
    <!-- InstanceParam name="setdatetype" type="text" value="" -->
    <!-- InstanceParam name="cleanup" type="text" value="" -->
    </head>
    <body onload="" onunload="">
    <%
    Response.Buffer = True
    If (Request.ServerVariables("HTTPS") = "on") Then
        Dim xredir__, xqstr__
        xredir__ = "http://" & Request.ServerVariables("SERVER_NAME") & _
                   Request.ServerVariables("SCRIPT_NAME")
        xqstr__ = Request.ServerVariables("QUERY_STRING")
        if xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
        Response.redirect xredir__
    End if
    %>
    <div id="wrapper">
      <div id="header">
        <div id="hdrLink"><a href="../../index.asp"><img src="../../assets/images/mainTemplate/headerImg.png" width="839" height="183" border="0" /></a></div>
      </div>
      <div id="sidebar">
        <div id="navigation">
          <!-- menu script itself. you should not modify this file -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu.js"></script>
          <!-- items structure. menu hierarchy and links are stored there -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_items.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_items.js"></script>
          <!-- files with geometry and styles structures -->
          <script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_tpl2.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_tpl.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_tpl.js"></script>
          <script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_tpl.js"></script>
          <script type="text/javascript" language="javascript">
    <!--//
    // Make sure the menu initialization is right above the closing &lt;/body&gt; tag
    // Moving it inside other tags will not affect the position of the menu on
    // the page. If you need this feature please consider Tigra Menu GOLD.
    // each menu gets two parameters (see demo files)
    // 1. items structure
    // 2. geometry structure
    new menu (MENU_ITEMS, MENU_TPL);
    // If you don't see the menu then check JavaScript console of the browser for the error messages
    // "Variable is not defined" error indicates that there's syntax error in that variable's definition
    // or the file with that variable isn't properly linked to the HTML document
    //-->
    </script>
        </div>
        <div id="sbar-image3"> <a href="http://www.facebook.com/pages/International-Lightning-Class-Association/197584991571" target="_blank"><img src="../../assets/images/mainTemplate/facebook.png" alt="Facebook ILCA link" width="36" height="36" border="0" /></a>  <a href="http://twitter.com/IntLightning" target="_blank"><img src="../../assets/images/mainTemplate/twitter.png" alt="Twitter ILCA link" width="36" height="36" border="0" /></a>
          Connect with us</span></span></span>
           <br />
        </div>
        <div id="sbarSearch">
    <!-- SiteSearch Google -->
    <FORM method=GET action="http://www.google.com/search">
    <input type=hidden name=ie value=UTF-8>
    <input type=hidden name=oe value=UTF-8>
    <TABLE width="126" align="center" bgcolor="#FFFFFF"><tr><td width="135"><img src="../../assets/images/mainTemplate/google.jpg" width="68" height="21" alt="Google logo" />
    </td></tr>
    <tr>
    <td><input type=text name=q size=20 maxlength=255 value="" />
      <input type=submit name=btnG value="Google Search" />
      <font size=-2>
    <input type=hidden name=domains value="www.lightningclass.org"><br><input type=radio
    name=sitesearch value=""> Web
    <input type=radio name=sitesearch value="www.lightningclass.org" checked>
    Site<br>
    </font>
    </td></tr></TABLE>
    </FORM>
    <!-- SiteSearch Google -->
        </div>
        <div id="sbarTranslate">
          <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up _source_language=en&w=148&h=60&title=&border=&output=js"></script>
        </div>
        <div id="sbar-image1"><a href="http://www.guadalajara2011.org.mx/esp/01_inicio/index.asp"><img src="../../assets/images/mainTemplate/panAm.jpg" width="116" height="129" border="0" /></a></div>
        <div id="sbar-image2"><a href="../../membership/joinRenew/membershipOptions.asp"><img src="../../assets/images/mainTemplate/joinILCA.png" alt="Join the ILCA" width="113" height="113" border="0" /></a></div>
      </div>
      <div id="background">
        <div id="mainContent"> <!-- InstanceBeginEditable name="mainContent" -->
          <div id="docHdr"> Header </div>
          <div id="docBody">
            <div id="listMe">
              <form ACTION="<%=MM_editAction%>" METHOD="POST" name="needavailUpdate">
                <fieldset id="needavailUpdate" name="needavailUpdate">
                  <legend class="legend">Need/Available</legend>
                  <br />
                  <label for="naType">Request Type:</label>
                  <label>
                    <select name="naType" id="naType" tabindex="1">
                      <option value="" <%If (Not isNull((rsneedAvail.Fields.Item("naType").Value))) Then If ("" = CStr((rsneedAvail.Fields.Item("naType").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>></option>
                      <%
    While (NOT rsneedavailReq.EOF)
    %>
                      <option value="<%=(rsneedavailReq.Fields.Item("requestKey").Value)%>" <%If (Not isNull((rsneedAvail.Fields.Item("naType").Value))) Then If (CStr(rsneedavailReq.Fields.Item("requestKey").Value) = CStr((rsneedAvail.Fields.Item("naType").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsneedavailReq.Fields.Item("requestType").Value)%></option>
                      <%
      rsneedavailReq.MoveNext()
    Wend
    If (rsneedavailReq.CursorType > 0) Then
      rsneedavailReq.MoveFirst
    Else
      rsneedavailReq.Requery
    End If
    %>
                    </select>
                  </label>
                  <br />
                  <br />
                  <label>First and Last Name:
                    <input name="memName" type="text" id="memName" tabindex="2" value="<%=(rsneedAvail.Fields.Item("memName").Value)%>" />
                  </label>
                  <br />
                  <br />
                  <label>City:
                    <input name="city" type="text" id="city" tabindex="3" value="<%=(rsneedAvail.Fields.Item("city").Value)%>" />
                  </label>
                  <label>State: </label>
                  <label>
                    <select name="state" id="state" tabindex="4">
                      <option value="" <%If (Not isNull((rsneedAvail.Fields.Item("state").Value))) Then If ("" = CStr((rsneedAvail.Fields.Item("state").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>></option>
                      <%
    While (NOT rsStates.EOF)
    %>
                      <option value="<%=(rsStates.Fields.Item("stateCode").Value)%>" <%If (Not isNull((rsneedAvail.Fields.Item("state").Value))) Then If (CStr(rsStates.Fields.Item("stateCode").Value) = CStr((rsneedAvail.Fields.Item("state").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsStates.Fields.Item("stateName").Value)%></option>
                      <%
      rsStates.MoveNext()
    Wend
    If (rsStates.CursorType > 0) Then
      rsStates.MoveFirst
    Else
      rsStates.Requery
    End If
    %>
                    </select>
                  </label>
                  <br />
                  <br />
                  <label>Telephone#:
                    <input name="phone" type="text" id="phone" tabindex="5" value="<%=(rsneedAvail.Fields.Item("phone").Value)%>" />
                  </label>
                  <br />
                  <br />
                  <label>Email:
                    <input name="email" type="text" id="email" tabindex="6" value="<%=(rsneedAvail.Fields.Item("email").Value)%>" size="48" maxlength="48" />
                  </label>
                  <br />
                  <br />
                  <label>Additional Information:
                    <input name="info" type="text" id="info" tabindex="7" value="<%=(rsneedAvail.Fields.Item("info").Value)%>" size="58" maxlength="255" />
                  </label>
                  <br />
                  <br />
                  <input type="submit" name="addButton" id="addButton" value="Update Me" tabindex="5" />
                  <input type="reset" name="reset" id="reset" value="Reset" />
                </fieldset>
                <input type="hidden" name="MM_update" value="needavailUpdate" />
                <input type="hidden" name="MM_recordId" value="<%= rsneedAvail.Fields.Item("recID").Value %>" />
                <input type="hidden" name="eventID" value="<%= rsneedAvail.Fields.Item("eventID").Value %>" />
              </form>
            </div>
          </div>
          <!-- InstanceEndEditable --></div>
      </div>
      <div id="clear"></div>
      <div id="footer">
        <p><u><a href="../../membership/joinRenew/membershipOptions.asp" class="ftrLinks">Membership</a></u> | <u><a href="eventSelect.asp" class="ftrLinks">Racing</a></u> | <u><a href="../../classRules/documents/ilcaBylaws.asp" class="ftrLinks">Class Rules</a></u> | <u><a href="../../photoGallery/photos2008/index.asp" class="ftrLinks">Photo Gallery</a></u> | <u class="ftrLinks"><a href="../../marketplace/store/index.asp">Marketplace</a></u> | <u><a href="../../contacts/index.asp" class="ftrLinks">Contacts</a></u> | <u class="ftrLinks"><a href="../../siteMap.asp">Site Map</a></u><br />
          All Rights Reserved—International Lightning Class Association<br />
          <u><a href="mailto:[email protected]" class="ftrLinks">[email protected]</a></u><br />
          1528 Big Bass Drive, Tarpon Springs, Florida  34689— Phone: 727-942-7969 — Fax: 727-942-0173 — Skype: ilcaoffice</p>
      </div>
    </div>
    </body>
    <!-- InstanceEnd --></html>
    <%
    rsStates.Close()
    Set rsStates = Nothing
    %>
    <%
    rsneedavailReq.Close()
    Set rsneedavailReq = Nothing
    %>
    <%
    rsneedAvail.Close()
    Set rsneedAvail = Nothing
    %>

    Thank you for your attention and diligence. I know it was overwhelming. I've uploaded my new pages and found that they seem to be working as designed - whereas they weren't working totally correctly on localhost. I believe I'm good for now. If I run into more problems, I'll find a simpler way to present the problem. Thank you, again.

  • Header and Detail total mismatch

    Hi All,
            I have file to proxy scenario, and i am using XSLT mapping for source to Traget mapping,
    Here, I add all amounts in details and compare it to Header amount, issue is that although the totals are matching i am still getting total mismatch error.
    The number have 2 decimal places.
    This is the code that i am using:
    <xsl:if test="format-number(number($vInvoice),'#.00') != format-number(sum(a:MT_PaymentData/RecordSet/RecordLineItem/LineItemAmount),'#.00')">
                                       <xsl:value-of select="string('AmtMisMatch ')"/>
                                  </xsl:if>
    Pls advice,
    XIer

    Hi,
    Did you try to use it in your mapping? I mean import the zip in your Interface Mapping and try to execute it there.And see if you are getting the wrong output still. Even i was getting the wrong output in the XMLSPY for my code. But when i implemented the same code in mapping it worked fine.
    Regards,
    Sanjeev.

  • Total records in database equals -1?

    I have some code, accessing an Access database. As part of development I need to see how many total records there are, so I have the code I took off of bindings in CS 5:
              <p align="center">/<%=(Recordset1_first)%>/<%=(Recordset1_last)%>/<%=(Recordset1_total)%></p >
    Why would _total always equal -1? The code is otherwise functional but the -1 does not change regardless if I add a record or delete a record?
    Curiouser and curiouser…
    Ross

    I try changing the cursor type and it had no effect whatsoever I also tried looking for a simple "attach" for this posting and could not find one. I therefore attached the full ASP so you could see what kind of stuff I'm talking about. Could you forward this as appropriate?
    Thanks.
    Ross
    =============================code=========================
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include virtual="/Connections/nextdns.asp" -->
    <%
      dim MM_nextdns_STRING
          MM_nextdns_STRING ="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End I
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' *** Redirect if username exists
    MM_flag = "MM_insert"
    If (CStr(Request(MM_flag)) <> "") Then
      Dim MM_rsKey
      Dim MM_rsKey_cmd
      MM_dupKeyRedirect = "/already.asp"
      MM_dupKeyUsernameValue = CStr(Request.Form("11"))
      Set MM_rsKey_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsKey_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsKey_cmd.CommandText = "SELECT id2 FROM login2 WHERE id2 = ?"
      MM_rsKey_cmd.Prepared = true
      MM_rsKey_cmd.Parameters.Append MM_rsKey_cmd.CreateParameter("param1", 200, 1, 255, MM_dupKeyUsernameValue) ' adVarChar
      Set MM_rsKey = MM_rsKey_cmd.Execute
      If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
        ' the username was found - can not add the requested username
        MM_qsChar = "?"
        If (InStr(1, MM_dupKeyRedirect, "?") >= 1) Then MM_qsChar = "&"
        MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & MM_dupKeyUsernameValue
        Response.Redirect(MM_dupKeyRedirect)
      End If
      MM_rsKey.Close
    End If
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
      If condition = "" Then
        MM_IIf = ifFalse
      Else
        MM_IIf = ifTrue
      End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "form3") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "INSERT INTO login2 (id2, password2, AccessLev) VALUES (?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("11")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("22")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 5, 1, -1, MM_IIF(Request.Form("accesslev"), Request.Form("accesslev"), null)) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
      End If
    End If
    %>
    <%
    ' *** Delete Record: construct a sql delete statement and execute it
    If (CStr(Request("MM_delete")) = "form2" And CStr(Request("MM_recordId")) <> "") Then
      If (Not MM_abortEdit) Then
        ' execute the delete
    mm_nextdns_string = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
           Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "DELETE FROM login2 WHERE id2 = ?"
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 200, 1, 255, Request.Form("MM_recordId")) ' adVarChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
      End If
    End If
    %>
    <%
    If (CStr(Request("MM_insert")) = "form3") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
       MM_nextdns_string = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
         MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "INSERT INTO login2 (id2, password2) VALUES (?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("121212")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("343434")) ' adVarWChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl0
        MM_editRedirectUrl = "inserted.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim delit_total
    Dim delit_first
    Dim delit_last
    ' set the record count
    ' set the number of rows displayed on this page
    If (delit_numRows < 0) Then
      delit_numRows = delit_total
    Elseif (delit_numRows = 0) Then
      delit_numRows = 1
    End If
    ' set the first and last displayed record
    delit_first = 1
    delit_last  = delit_first + delit_numRows - 1
    ' if we have the correct record count, check the other stats
    If (delit_total <> -1) Then
      If (delit_first > delit_total) Then
        delit_first = delit_total
      End If
      If (delit_last > delit_total) Then
        delit_last = delit_total
      End If
      If (delit_numRows > delit_total) Then
        delit_numRows = delit_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    response.write("precount")
    If (Recordset1_total = -1) Then
      ' count the total records by iterating through the recordset
      Recordset1_total=0
    response.write("incount")
       While (Not Recordset1.EOF)
        Recordset1_total = Recordset1_total + 1
        Recordset1.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (Recordset1.CursorType > 0) Then
        Recordset1.MoveFirst
      Else
        Recordset1.Requery
      End If
      ' set the number of rows displayed on this page
      If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
      ' set the first and last displayed record
      Recordset1_first = 1
      Recordset1_last = Recordset1_first + Recordset1_numRows - 1
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("idid2"))
    If MM_valUsername <> "" Then
      Dim MM_fldUserAuthorization
      Dim MM_redirectLoginSuccess
      Dim MM_redirectLoginFailed
      Dim MM_loginSQL
      Dim MM_rsUser
      Dim MM_rsUser_cmd
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/b.asp"
      MM_loginSQL = "SELECT id2, password2"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM login2 WHERE id2 = ? AND password2 = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 255, Request.Form("pwd2")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("asd1"))
    If MM_valUsername <> "" Then
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/b.asp"
      MM_loginSQL = "SELECT id2, password2"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM login2 WHERE id2 = ? AND password2 = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 255, Request.Form("asd2")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_nextdns_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM login2"
    Recordset1_cmd.Prepared = true
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <!--#include virtual="/includes/adovbs.inc" -->
    <%
    Repeat1__numRows = 20
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim Recordset1_total
    Dim Recordset1_first
    Dim Recordset1_last
    ' set the record count
    Recordset1_total = Recordset1.RecordCount
    ' set the number of rows displayed on this page
    If (Recordset1_numRows < 0) Then
      Recordset1_numRows = Recordset1_total
    Elseif (Recordset1_numRows = 0) Then
      Recordset1_numRows = 1
    End If
    ' set the first and last displayed record
    Recordset1_first = 1
    Recordset1_last  = Recordset1_first + Recordset1_numRows - 1
    ' if we have the correct record count, check the other stats
    If (Recordset1_total <> -1) Then
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
      If (Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
    MM_valUsername=CStr(Request.Form("idid2"))
    If MM_valUsername <> "" Then
      MM_fldDynamicRedirect=""
      MM_fldUserAuthorization="AccessLev"
      MM_redirectLoginSuccessDynamic="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712- 4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839 B-02EB4947FC25}/b.asp"
      MM_flag="ADODB.Recordset"
      set MM_rsUser = Server.CreateObject(MM_flag)
      MM_rsUser.ActiveConnection = MM_nextdns_STRING
      MM_rsUser.Source = "SELECT id2, password2"
      If MM_fldDynamicRedirect <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldDynamicRedirect
      If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
      MM_rsUser.Source = MM_rsUser.Source & " FROM login2 WHERE id2='" & Replace(MM_valUsername,"'","''") &"' AND password2='" & Replace(Request.Form("pwd2"),"'","''") & "'"
      MM_rsUser.CursorType = 0
      MM_rsUser.CursorLocation = 2
      MM_rsUser.LockType = 3
      MM_rsUser.Open
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        ElseIf (MM_fldDynamicRedirect <> "") Then
          MM_redirectLoginSuccessDynamic = CStr(MM_rsUser.Fields.Item(MM_fldDynamicRedirect).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccessDynamic = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccessDynamic)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {
        background-image: url(/graphics/spackle.gif);
    .ctable {
        border-top-style: solid;
        border-right-style: solid;
        border-bottom-style: solid;
        border-left-style: solid;
    </style>
    <script src="/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="160" border="1">
      <tr>
        <td width="106"><p><img src="/graphics/coed1.jpg" width="42" height="53" alt="coed1" /></p>
          <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_cart" />
            <input type="hidden" name="add" value="1" />
            <input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
            <input type="hidden" name="business" value="[email protected]" />
            <input type="hidden" name="item_name" value="aaaa" />
            <input type="hidden" name="item_number" value="aaaa" />
            <input type="hidden" name="amount" value=".12" />
            <input type="hidden" name="currency_code" value="USD" />
            <input type="hidden" name="cancel_return" value="http://heritage.site88.net/badorder.asp" />
            <input type="hidden" name="receiver_email" value="[email protected]" />
            <input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
            <input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
            <input type="hidden" name="no_shipping" value="0" />
            <input type="hidden" name="no_note" value="0" />
            <input type="image" name="submit" src="http://images.paypal.com/images/sc-but-03.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!" />
        </form></td>
        <td width="16"> </td>
        <td width="16"> </td>
      </tr>
      <tr>
        <td> </td>
        <td><img src="/graphics/coed1.jpg" width="14" height="18" alt="coed1" /></td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td><img src="/graphics/coed1.jpg" width="20" height="31" alt="coed1" /></td>
      </tr>
    </table>
    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <div align="center">
        <input type="hidden" name="cmd" value="_cart" />
        <input type="hidden" name="display" value="1" />
        <input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
        <input type="hidden" name="business" value="[email protected]" />
        <input type="hidden" name="receiver_email" value="[email protected]" />
        <input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
        <input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
        <input type="image" name="submit" src="http://images.paypal.com/images/view_cart_02.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!" />
     </div>
    </form>
    <p> </p>
    <table width="492" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="63"><label for="recnum6">Recnum</label></td>
        <td width="101"> ID</td>
        <td width="154">Password </td>
        <td width="164">AccessLev</td>
      </tr>
    </table>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
    <td><input name="recnum" type="text" id="recnum" value="<%=(Recordset1.Fields.Item("recnum").Value)%>" size="10" /></td>
    <td><input name="idid" type="text" id="idid" value="<%=(Recordset1.Fields.Item("id2").Value)%>" size="10" /></td>
    <td><input name="pwd" type="text" id="pwd" value="<%=(Recordset1.Fields.Item("password2").Value)%>" /></td>
    <td><input name="accesslev" type="text" id="accesslev" value="<%=(Recordset1.Fields.Item("AccessLev").Value)%>" /></td>
    <label for="accesslev"></label>
    <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
      response.write("<br>")
    Wend
    %>
    <p align="center">/<%=(Recordset1_first)%>/<%=(Recordset1_last)%>/<%=(Recordset1_total)%>/</ p>
    <p align="center"> </p>
    <form id="form4" name="form4" method="post" action="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/ inscust.asp">
      <div align="center">
        <input type="submit" name="register" id="register" value="Register as New User" />
      </div>
    </form>
    <p align="center">-or- </p>
    <form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
      <label for="idid2">                                                                      ID:</label>
      <input type="text" name="idid2" id="idid2" />
      <label for="pwd2">Pwd:</label>
      <input type="password" name="pwd2" id="pwd2" />
      <input type="submit" name="login" id="login" value="Login" />
      <a href="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/re gister.asp">
      </a>
    </form>
    <form action="<%=MM_editAction%>" method="POST" id="form3" name="form3">
        <label for="11">IdId:</label>
        <input type="text" name="11" id="11" />
        <label for="22">Password2:</label>
        <input type="password" name="22" id="22" />
      <label for="accesslev">AL:</label>
      <input name="accesslev" type="text" id="accesslev" value="2" size="1" maxlength="1" />
      <input type="submit" name="insins" id="insins" value="Insert" />
        <input type="hidden" name="MM_insert" value="form3" />
      </p>
    </form>
    <p></p>
    <p></p>
    <form ACTION="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/ dodel.asp" METHOD="POST" id="form2" name="form2">
      <label for="delrec">Recnum:</label>
      <input type="text" name="delrec" id="delrec" />
      <input type="submit" name="deleir" id="deleir" value="Delete" />
    </form>
    <p></p>
    <p>
      <script type="text/javascript">
    function zappaypalcookies()
        alert("called");
        alert(document.cookie.length);
        alert(document.cookie);
        document.cookie="fred=sam";
            alert(document.cookie);
      </script></p>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  • Delete Line Item Document Using  DI W/Out Using Recordset

    in my DI Version 6.50.097 , there is no properties in Document_Lines Object that fasilitate us to remove one of line items in document. We can do that by recordset.doquery "delete POR1 where ......
    but when we open the document the value (if we update every line item do not reflect the value we wants especially in total in header document.
    Any suggestion to do that without using recordet.
    Thx
    Cheers,

    I haven't tried this myself, but I guess you could set up a dummy Item Master called "Cancelled" with a price of zero, and try changing the item code to that.
    John.

  • Recordset is not updateable in Access 2010 but works in previous versions

    I have a database that writes data from SQL tables to unbound controls on an unbound form. This database has been in place for years and has worked great. We recently just upgraded to 2010 and now I' m receiving an error message saying that the recordset
    is not updateable. This is the same exact code and settings and everything else that has worked in 2007.
    I know there are other posts on here that addressed this but none of the recommendations have solved my problem. I've tried changing the forms to dynaset(inconsistent updates), etc. and nothing.
    The actual SQL is all in VBA where it's running the SQL commands against SQL Server and writing the data to the unbound fields and then also writing it back to the tables. As I said, this has been in place for a number of years and has always worked great
    but I just can't put any rhyme to reason why it's not working in 2010.

    Hi,
    Based on my research, here’s the information about this error message:
    A recordset is never updateable when:
    It is based on a Crosstab query.
    It is based on a Union Query.
    It is an Aggregate Query that calculates a sum, average, count or other type of total on the values in a field.
    It is an Update Query that references a field in the Update To row from either a crosstab query, select query, or subquery that contains totals or aggregate functions
         Note: By using a domain aggregate function in the Update To row of an update query, you can reference fields from either a crosstab query, select query, or subquery that contains totals or aggregate functions.
    It is based on a Query that includes a linked ODBC table with no unique index.
    The database was opened as read-only or is located on a read-only drive.
    It is a SQL pass-through query.
    It is a query whose UniqueValues property is set to Yes. (That is, it is a query with a DISTINCT predicate.)
    Cartesian Joins(that is, a query that includes more than one table or query, and the tables or queries aren't joined by a join line in Design view.)
    Query based on three or more tables in which there is a many-to-one-to-many relationship.
         Note: Though you can't update the data in the query directly, you can update the data in a form or data access page based on the query if the form's RecordsetType property is set to Dynaset (Inconsistent Updates).
    Calculated fields. Even if the query itself is updateable, if a column in a query is based on a formula, the field cannot be updated. However, if the other fields in the formula are updated, the calculated field
    will automatically update.
    Recordsets Are Updateable Under Certain Conditions
    1. Query based on a Join of tables with no Relationship.
    Problem: If a query is based on two or more tables that DO NOT have a relationship established (with Referential Integrity enabled), the query will be non-updateable.
    Solution: Create a Primary Key or Unique Index on ALL of the fields used in the Join on the "one-side" table. To be clear, this means ONE primary key or unique index based on all of the fields, not separate indexes
    on each field.
    In a query based on a Join of tables with a one-to-many relationship (1:M), you might not be able to edit the data in one or more fields. As the following examples show :
    2. Join field from the "one" side.
    Problem: If you have a 1:M relationship created between two tables, you cannot change the primary key field (used in the Join) of the table on the "one" side of the relationship.
    Solution: Enable cascading updates between the two tables.
    3. New records, if the "many" side join field doesn't appear in the datasheet
    Problem: In a query based on a 1:M relationship, you can create a new record and fill in the fields that come from the "one" side table, but if the join field from the "many" side table is not visible in the
    query (that is, the foreign key), you cannot add data to the "many" side fields.
    Solution: Add the join field from the "many" side table (ie, foreign key) to your query to allow adding new records.
    4. New records on the "one" side that are duplicates of other "one" side records.
    Problem: When adding a new record, if you try to type into the "one" side fields, you will be attempting to create a new record. Even if you use the same primary key values, it will give you an error.
    Solution: Add a value to the "many" side join field (foreign key) that matches the "one" side join field (primary      key) of an already existing record. The "one" side values will simply
    appear.
    5. Join field from the "many" side, after you've updated data on the "one" side
    Problem: If you are currently editing fields from the  "one" side of the relationship, you cannot change the "many" side join field (foreign key).
    Solution: Save the record; then you'll be able to make changes to the "many" side join field.
    6. New records, if entire unique key of ODBC table isn't output
    Problem: This is different than #5 under Never Updateable. In this case, the primary key of the linked ODBC table exists, but is not added to the query.
    Solution: Select all primary key fields of ODBC tables to allow inserts into them.
    7. Query does not have Update Data permissions
    Problem: Query (or underlying table) for which Update Data permission isn't granted.
    Solution: To modify data, permissions must be assigned.
    8. Query does not have Delete Data Permissions
    Problem: Query (or underlying table) for which Delete Data permission isn't granted
    Solution: To delete data, permissions must be assigned.
    Jaynet Zhang
    TechNet Community Support

  • Creating a recordset filtered by login credentials

    Hello everyone... I'm really hoping I can get an answer to
    this...
    I've created a login page using the "login user" behavior and
    it works perfectly. But I'm having trouble identifying the user
    after they've logged in. For example, I may want to greet them by
    name "Hello Michael!" after they've logged in... for the life of me
    I can't get it to work.
    I've tried using the POST variables sent from the login form
    and I've tried using cookies set from the login form... neither
    works.
    When I test the recordset in the recordset dialogue box
    (where it asks you to provide a value for testing) it works, so I'm
    just totally confused.
    How can I perform a database query using the data supplied at
    login? (Login being the inherit "login user" behavior in DWCS3)...
    Seriously, I can't tell you how much I would appreciate some
    help here... Maybe it's because it's 3:15am and I'm tired... but
    I'm pulling my hair out.
    GRACIAS.

    I solved my problem and I thought I'd come back and post it
    here in case anyone else has the same problem.
    The log-in server behavior creates a session variable for the
    username submitted on the login page. The variable is called
    "MM_Username". You can use that session variable as your filter
    criteria on following pages to call that user's record from the DB.
    Hope that helps...

  • Detecting message part after Recordsets per Message

    Hi !
    Scenario: File -> XI -> RFC
    Because of some big text files (about 30 or 40 mb) as input files, we need to use partition our files using Recordsets Per Message in the content conversion parameters of our file adapter (sender).
    We need to send to the RFC, the total number of messages that we are sending or at least, a flag to indicate that we are sending the LAST message.
    Example:
    one file has 21.000 records. We set the "recordsets per message" to 3000. Then XI will receive 7 messages with 3000 records each. When we call the RFC (receiver) after processing the 7th package, we need to send also a flag to indicate that that was the last message.
    Any ideas?
    Thanks !

    Hi Matias,
    There's a BPM pattern that deals with something like this. it's called BpmPatternCollectMessage and collects all messages of the same type until it gets a terminating message. so in your case you could define the terminating message as being the last / summary line of your input file (creating a new recordset type for that) and once you receive this message, which should be after the split up parts of your file, you could send out the RFC calls.
    Question is, how that will perform with large files.... probably not too well, although there have been some performance improvements to BPMs lately.
    Maybe you should try that as well and run a performance test against your solution with the Z Table. The problem with the Z table solution is, that you have to deal with the fact, that mappings can be executed more than once, in the case errors did occurr. so this can mean, that your function and hence the call to the Z table could occurr more than once for the same message. (remember mappings are stateless....)
    Regards
    Christine

  • Acummulating a total using two files

    I have two files that I am working with. One file is a lsit
    of all our customer orders that contains basic data that has been
    estimated. The second file I have is sorted by order number (the
    same key as file one) and contains multiple records for each order
    that is created once the actual order has been billed. And in the
    event that credits or additions to that same order take place, the
    number of records for each order number will increase in that
    second file.
    What I want to do is to move through a recordset that is
    based on file one. As each record of that recordset is read I want
    a specific field (amount due) to be subject to logic whereby file 2
    is checked to see if an order number exists, and if it does, a loop
    is performed accumulating a total (amount due) until such time as
    all records for that order number have been read. I will then
    <cfoutput> the data records for recordset one from file one
    with either the estimated or actual amount due.
    On our AS400 I know the programmers can set a lower limit to
    get right to the beginning of the data that is sought. I would be
    very interested in any ColdFusion technique that is recommended
    that can accomplish the same thing. I am also thinking that
    <cfbreak> could be utilized within a loop to quickly exit the
    sorted list once the order number changes.
    I will be creating a list of two thousand records, so getting
    this program to run as quickly/efficiently as possible is
    important. Else the program will not be used by our staff. I would
    be very appreciative of recommendations on the best methods to
    accomplish what I have outlined. Thank you

    I have arrived at a partial solution based on your (very
    appreciated) advice that I use a query of query. The following is
    the last of 4 recordsets that I used to get my data. However,
    because in the WHERE clause I ask for matching B/L (order) numbers,
    I do not get a full data listing. (Yet I need the mutual primary
    key for each file). What I need are all of the records from
    Recordset2 and only those from Recordset3 that have a matching
    B/L#. I do not want to lose records just because the order has not
    yet been billed. What else do I need to implement? Thanks!
    <cfquery name="Recordset4" dbtype="query">
    SELECT Recordset3.RBLNO as BL, ((Recordset3.RCUTR - 100) /
    100) as CUT,(Recordset2.DTAMTsum * -1) as LH, (Recordset2.DTAMTsum
    * ((Recordset3.RCUTR - 100) / 100)) as NET
    FROM Recordset3, Recordset2
    WHERE Recordset3.RBLNO = Recordset2.DTBLNO
    </cfquery>

Maybe you are looking for

  • Issues with multiple subnets - ASA5510 to Vigor 2820 VPN

    Hi there, I am hoping someone here can help.  I have been struggling for some time to sort out issues in a VPN we have between our main London office and the Edinburgh branch office.  We have an ASA 5510  in London, talking to a Vigor 2820 in Edinbur

  • I can no longer sync my yahoo mail account

    Since yesterday my Yahoo account stop syncing. I deleted and added and now it times out

  • Can I go back to firefox 3.6

    I downloaded Firefox 4 and lost Norton protection on websites. Tried to reload Firefox 3.6 could not , if I can't get Norton protection I will have to delete Firefox 4

  • C-media audio problems

    I've been having problems with flash games and animations. Basically the problem used to be that each time a flash movie/game would try to play a sound, it would freeze for a second then continue (playing the sound properly). This would happen almost

  • Itunes 10 installation error -  Windows installer package

    When I try and install I tunes 10 i get this error. "There is a problem with this windows installer package a program required for this install to complete could not be run. Contact support personnell or package vendor"