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.

Similar Messages

  • Retain position on continuous form through requery

    I have a continuous form that, for reasons of efficiency, must use an underlying query that groups records and provides totals. Therefore, the underlying recordset is (correctly) not updateable. However, I do need to flip the value of one of the (header)
    fields from True to False or False to True. So I have a button in the detail section of the form that checks the current value, creates the SQL statement to change the value, and runs the SQL statement.
    So far, so good. Now, to get the new data to appear, I must requery the form, but that, of course causes me to lose my position on the continuous form.
    So I set a variable to the value of the current PK in the header table before my requery, then use Bookmark to return to the record that was current before the update & requery. Again, so far, so good...except for one thing.
    The user may have the current record in any vertical position on the visible part of the list. That is, the record being edited could be at the top of the visible records, the second one down, etc, or even the last record visible (I have a vertical
    scroll bar). Using Bookmark returns me to that record, but it automatically places that current record at the top of the visible portion of the record list (form's detail section) after the requery. This is quite confusing for the users, and they can
    easily lose their places.
    Is there a way, not only to return the current record after the requery, but to return that record to the same vertical position within the form's records in the detail section so that there is no apparent jumping around?

    Hi Brian
    D. Hart,
    In early 2000s I published the solution here:
    http://am.rusimport.ru/MsAccess/topic.aspx?ID=24
    That sample isn't English localized. That's why I redesigned it for you. You can download the ajusted version from here:
    https://www.dropbox.com/s/521xxb81ubgh2bc/VakshulRequeryEN2010.accdb?dl=0
    By the way, the key moment of it was discussed early here:
    https://social.msdn.microsoft.com/Forums/office/en-US/102244b7-9ae7-446e-9d31-b23eda5f758b/how-to-determine-the-number-of-records-displayed-in-a-continuous-form?forum=accessdev
    Sergiy Vakshul

  • DW8 Bindings Panel not showing recordsets

    G'day,
    I have a number of sites configured, with many pages using
    recordsets. For some reason DW8 is no longer showing the recordsets
    in the bindings panel. This is true for pages that were created in
    DW8 and still in their original code state and for pages that I
    have modified to send e-mail when a record is added, so it is not
    due to me modifying code.
    Any tips on how to refresh or re-populate the bindings panel
    would be gratefully appreciated.
    DW8 | ASP | VBScript

    It looks like you are creating a query from a query rather
    than from a data
    table. Is that right?
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner''s
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "emjemnsw" <[email protected]> wrote in
    message
    news:[email protected]...
    > yes they do.
    > I've attached a code sample of one recordset that I
    haven't "messed" with
    > but
    > doesn't show in the bindings panel.
    > I have created some other recordsets today and they are
    showing OK in the
    > panel.
    >
    > Thanks,
    > Mark
    >
    > <%
    > Dim rsOpenPlans
    > Dim rsOpenPlans_cmd
    > Dim rsOpenPlans_numRows
    >
    > Set rsOpenPlans_cmd = Server.CreateObject
    ("ADODB.Command")
    > rsOpenPlans_cmd.ActiveConnection = MM_NewsDB_STRING
    > rsOpenPlans_cmd.CommandText = "SELECT ID FROM
    > qryMigration_Open_Migrations"
    > rsOpenPlans_cmd.Prepared = true
    >
    > Set rsOpenPlans = rsOpenPlans_cmd.Execute
    > rsOpenPlans_numRows = 0
    > %>
    > <%
    > ' *** Recordset Stats, Move To Record, and Go To Record:
    declare stats
    > variables
    >
    > Dim rsOpenPlans_total
    > Dim rsOpenPlans_first
    > Dim rsOpenPlans_last
    >
    > ' set the record count
    > rsOpenPlans_total = rsOpenPlans.RecordCount
    >
    > ' set the number of rows displayed on this page
    > If (rsOpenPlans_numRows < 0) Then
    > rsOpenPlans_numRows = rsOpenPlans_total
    > Elseif (rsOpenPlans_numRows = 0) Then
    > rsOpenPlans_numRows = 1
    > End If
    >
    > ' set the first and last displayed record
    > rsOpenPlans_first = 1
    > rsOpenPlans_last = rsOpenPlans_first +
    rsOpenPlans_numRows - 1
    >
    > ' if we have the correct record count, check the other
    stats
    > If (rsOpenPlans_total <> -1) Then
    > If (rsOpenPlans_first > rsOpenPlans_total) Then
    > rsOpenPlans_first = rsOpenPlans_total
    > End If
    > If (rsOpenPlans_last > rsOpenPlans_total) Then
    > rsOpenPlans_last = rsOpenPlans_total
    > End If
    > If (rsOpenPlans_numRows > rsOpenPlans_total) Then
    > rsOpenPlans_numRows = rsOpenPlans_total
    > End If
    > End If
    > %>
    >
    > <%
    > ' *** Recordset Stats: if we don't know the record
    count, manually count
    > them
    >
    > If (rsOpenPlans_total = -1) Then
    >
    > ' count the total records by iterating through the
    recordset
    > rsOpenPlans_total=0
    > While (Not rsOpenPlans.EOF)
    > rsOpenPlans_total = rsOpenPlans_total + 1
    > rsOpenPlans.MoveNext
    > Wend
    >
    > ' reset the cursor to the beginning
    > If (rsOpenPlans.CursorType > 0) Then
    > rsOpenPlans.MoveFirst
    > Else
    > rsOpenPlans.Requery
    > End If
    >
    > ' set the number of rows displayed on this page
    > If (rsOpenPlans_numRows < 0 Or rsOpenPlans_numRows
    > rsOpenPlans_total)
    > Then
    > rsOpenPlans_numRows = rsOpenPlans_total
    > End If
    >
    > ' set the first and last displayed record
    > rsOpenPlans_first = 1
    > rsOpenPlans_last = rsOpenPlans_first +
    rsOpenPlans_numRows - 1
    >
    > If (rsOpenPlans_first > rsOpenPlans_total) Then
    > rsOpenPlans_first = rsOpenPlans_total
    > End If
    > If (rsOpenPlans_last > rsOpenPlans_total) Then
    > rsOpenPlans_last = rsOpenPlans_total
    > End If
    >
    > End If
    > %>
    >

  • ASP recordset quotation mark trouble

    Hello everyone,
    I've got a recordset that pulls sales data based on a
    specific product that
    is selected by the client from a dynamic dropdown of all the
    products in the
    database.
    The trouble:
    If the product name has quotation marks in it, no results are
    returned.
    If there are no quotation marks in the product name, results
    are returned.
    I thought everything was going fine during testing, until I
    used quotation
    marks in a product's name. The client enters the product
    names as he or she
    adds new ones to the database for this online store and
    should be able to
    use quotes.
    This product name works: The Gadget
    This one does not: The "Gadget"
    The value from the dropdown used in the recordeset is named
    product_Name.
    I'm thinking the quotes being inserted into the SQL select
    statement might
    be the trouble ( WHERE product_Name = ? ), but I'm not sure.
    Here's the relevant recordset code:
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "1"
    If (Request.QueryString("product_Name") <> "") Then
    Recordset1__MMColParam = Request.QueryString("product_Name")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_conn_box_STRING
    Recordset1_cmd.CommandText = "SELECT cst_FirstName,
    cst_LastName, order_ID,
    order_Total, orderSKU_Quantity, product_Name FROM
    cwq_OrderDetails WHERE
    product_Name = ? ORDER BY cst_LastName ASC"
    Recordset1_cmd.Prepared = true
    Recordset1_cmd.Parameters.Append
    Recordset1_cmd.CreateParameter("param1",
    200, 1, 125, Recordset1__MMColParam) ' adVarChar
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = -1
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    Here's the relevant dynamic dropdown page's code.
    The dropdown works fine, but if needed this shows where the
    product name
    used in the select statement comes from.
    <%
    Dim eventlist
    Dim eventlist_cmd
    Dim eventlist_numRows
    Set eventlist_cmd = Server.CreateObject ("ADODB.Command")
    eventlist_cmd.ActiveConnection = MM_conn_box_STRING
    eventlist_cmd.CommandText = "SELECT DISTINCT product_Name
    FROM
    cwq_OrderDetails2 WHERE product_Archive = 0 ORDER BY
    product_Name ASC"
    eventlist_cmd.Prepared = true
    Set eventlist = eventlist_cmd.Execute
    eventlist_numRows = 0
    %>
    <form name="form1" method="get"
    action="eventresults.asp">
    <label>Events
    <select name="product_Name" id="allevents">
    <option value="">(select an event)</option>
    <%
    While (NOT eventlist.EOF)
    %><option
    value="<%=(eventlist.Fields.Item("product_Name").Value)%>"><%=(eventlist.Fields.Item("pro duct_Name").Value)%></option>
    <%
    eventlist.MoveNext()
    Wend
    If (eventlist.CursorType > 0) Then
    eventlist.MoveFirst
    Else
    eventlist.Requery
    End If
    %>
    </select>
    </label>
    <input name="button" type="submit" class="formButton"
    id="button" value="
    View Now ">
    </form>
    Thank you for taking a look.
    Take care,
    Tim

    Thanks Matthew,
    I had thought about &quot but that would actually make
    for a lot of work in changing other parts of the application. It
    would cause some problems with a couple of reports the application
    generates and exports as far as naming conventions as well as order
    confirmation emails and invoices that are automatically sent.
    Also, I honestly would rather not have to tell clients they
    need to enter code in. I've had a couple of folks who had very
    little experience with computers. Showing them how to upload a
    product image in a very user friendly admin section was difficult.
    I can't image trying to explain why they need to enter code instead
    of just typing The "Gadget" in the box that say's "Enter your
    product name".
    Thanks for taking a look, and I actually have a less complex
    app where that might work nicely :-)
    Take care,
    Tim

  • Advanced filter recordset asp

    Hi,
    I m trying to filter an asp recordset with % wildcart but impossible to do it.
    Have got a asp form with a dropdown list based on a recordset that stores value (numeric) in a variable (id).
    So this variable is used on my result asp page to filter a new recordset by this numeric value.
    Im using wild card in order to display all records like this SQL query:
    SELECT *
    FROM proprietes
    WHERE ville LIKE %MMColParam%           
    MMColParam defined like this :
    Numeric
    Request.Form("ville")
    default value %
    So when it generates sql query, it gives SELECT *FROM proprietes WHERE ville LIKE '%MMColParam%' and testing it, it works (testing recordset in dream) but saving it and reopens recordset the query becomes :   SELECT *FROM proprietes WHERE ville LIKE %MMColParam%   and testing recordset gives error !!
    Someone can help me?
    Thanks a lot.

    Hi thanks a lot
    Here my asp form :
    Request form "ville" value is coming from access database and is a numeric value (autoid) wich is used to filer recordset on results page.
    I done this type of fiter several times with other version of dreamweaver but with CS4 impossible to do it (or i missed something!!)
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/immo.asp" -->
    <%
    Dim local
    Dim local_cmd
    Dim local_numRows
    Set local_cmd = Server.CreateObject ("ADODB.Command")
    local_cmd.ActiveConnection = MM_immo_STRING
    local_cmd.CommandText = "SELECT * FROM villes"
    local_cmd.Prepared = true
    Set local = local_cmd.Execute
    local_numRows = 0
    %>
    <!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>Document sans titre</title>
    </head>
    <body>
    <p> </p>
    <p> </p>
    <form id="form1" name="form1" method="post" action="resultats3.asp">
      <p> </p>
      <p>
        <label>
          <select name="ville" id="ville">
            <option value="%" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If ("%" = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Indifférent</option>
            <%
    While (NOT local.EOF)
    %>
    <option value="<%=(local.Fields.Item("idville").Value)%>" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If (CStr(local.Fields.Item("idville").Value) = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(local.Fields.Item("ville").Value)%></option>
            <%
      local.MoveNext()
    Wend
    If (local.CursorType > 0) Then
      local.MoveFirst
    Else
      local.Requery
    End If
    %>
          </select>
        </label>
      </p>
      <p> </p>
      <p> </p>
      <p>
        <label>
          <input type="submit" name="button" id="button" value="Envoyer" />
        </label>
      </p>
    </form>
    <p> </p>
    <p> </p>
    </body>
    </html>
    <%
    local.Close()
    Set local = Nothing
    %>
    Here my asp results page:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/immo.asp" -->
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "%"
    If (Request.Form("ville") <> "") Then
      Recordset1__MMColParam = Request.Form("ville")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_immo_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM proprietes WHERE ville Like ?"
    Recordset1_cmd.Prepared = true
    Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, "%" + Recordset1__MMColParam + "%") ' adDouble
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <!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>Document sans titre</title>
    </head>
    <body>
    <p><br />
      <%
    response.write(request.form("ville"))%>
      <br />
      <br />
      SELECT * <br />
      FROM proprietes<br />
      WHERE ville LIKE '%vil%'
    </p>
    <p> </p>
    <p><br />
      <br />
    </p>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  • Recordset per message in Sender File Adapter

    Hi Friends
    I have configured a sender file adapter to pick up *.txt files from a specific path, Since the file is having thousands of records it is failing to process the file at  PI level . In order to avoid the problem I have kept Recordset Set Per Message as 10 , but still PI is processing all the records into a single message. Please help me in troubleshooting it.
    Regards
    Suman.

    Hi Suman,
      Go thru these threads for troubleshooting...
    Massive file
    Processing huge file loads through XI
    Processing of huge no of Inbound xml files
    Bottleneck in Large file processing
    How to process large data files in XI  ?  100 MB files ?
    Regds,
    Pinangshuk.

  • When I try to create a Recordset i get Javascript runtime error

    Please help i am working with Php and trying to create a
    recordset query to access my table etc. this is what i get when i
    click + Recordset from the Server Behaviors window:
    JavaScript error while loading RecordSet.htm:
    At line 1111 of file: "C:\Program
    Files\Macromedia\Dreamweaver
    8\Configuration\ServerBehaviors\PHP_MySQL\Recordset.js" : theStr =
    theStr.replace(/(?>)*/gi, ''''); //remove close tags
    SyntaxError: Invalid Quantifier ?

    i restarted it i am gonna restart the computer
    also went here
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19105&sliceId=1#dat
    didnt really help

  • Multiple tables in a recordset.

    Hi all,
    I have got a bit stuck with creating an advanced recordset that calls from multiple sub tables. I have created the SQL statement below (originally used inner joins but the code got too long and still didn't work).
    SELECT *
    FROM Main_Table, Table_1, Table_2, Table_3, Table_4, Table_5, Table_6, Table_7, Table_8, Table_9, Table_10, Table_11, Table_12, Table_13, Table_14, Table_15
    WHERE
    (((((((((((((((((Main_Table.ID_1 = Table_1.ID_1),
    Main_Table.ID_2 = Table_2.ID),
    Main_Table.ID_3 = Table_3.ID),
    Main_Table.ID_4 = Table_4.ID),
    Main_Table.ID_5 = Table_5.ID),
    Main_Table.ID_6 = Table_6.ID),
    Main_Table.ID_7 = Table_7.ID),
    Main_Table.ID_8 = Table_8.ID),
    Main_Table.ID_9 = Table_9.ID),
    Main_Table.ID_10 = Table_10.ID),
    Main_Table.ID_10 = Table_11.ID),
    Main_Table.ID_11 = Table_12.ID),
    Main_Table.ID_11 = Table_13.ID),
    Main_Table.ID_11 = Table_14.ID),
     Main_Table.ID_12 = Table_15.ID),
    AND cust_id = colname
    The idea is to get some text values from the sub tables by passing through the relevant ID of the main table to the sub tables ID. To add to the complexity the "cust_id = colname" is a passthrough from a prior page that only brings up a specific record from the main table. Further complexity may come where the two bolded sections are using a single ID from the main table to call from multiple sub tables.
    Ideally at the end of this I just want to pull the value from the recordset and drop into the page design. The page is PHP and the database/web server is using WAMP, if that helps?
    I feel i'm so close (but i'm probably nowhere near!). Can anyone help me before I lose my hair and develop a nervous tick? Unfortunately, I am still a bit of a novice with these things, so if it's my syntax or a coding issue please could you explain it in noob terms for me?
    Thank you in advance!

    The database was an access DB of 1 main table and 15 related tables that was then converted to MYSQL. The idea is that it will serve two purposes from web pages setup to point to it;
    1) To add records to the main database with dropdowns. Certain data will be shown depending on the dropdown selected.
    2) To show a data-only details screen.
    The data is complicated survey data and it was decided that the main table would store the variables and the sub tables would store the constants (Between 2 to 6 records) using the ID to link them.
    e.g.
    Name = Main table.name
    Address = Main table.address
    Position = Table 2.position
    Department = Table 2.Department
    etc...
    Have tried the AND statement above but the system just times out.
    Would it be easier to create multiple recordsets (15 recordsets of 1 main table and 1 sub table) and link it somehow to the cust_id? If so, how would I best set each up so only the relevant fields are pulled from the sub table for each recordset? Or am I being to adventerous and should I just give up and flatten the tables to 1 single table?
    Am starting to thin up top with this one! lol!

  • Recordsets with multiple options - AND, OR If Else and the "Any" Rule

    Hi,
    Been trying to get this to work for days now... I have a form with drop down lists that feeds through variables to a search page... The Recordset Jobsearch2 shown below works great so long as a user chooses and option that has info in the DB.... ie all fields must be present. I cannot seem to work out how to achieve and Any rule?...
    I have had 2 options suggested to me...
    a) the code below...
    if(isset($searchsector) && $searchsector !== "") {
    $query_jobsearch2 .= ' AND Sector LIKE "%' . mysql_real_escape_string($searchsector) . '%"';
    putting this in for each option..... but If Im told I have to add this in before the "$jobsearch2 = mysql_query" line... but when I do this the recordset disappears\is deleted...
    b) Using an Array and "Implode" -  this wouldbe great I'm sure if I had any clue how to do this and what it meant.
    MY CURRENT CODE
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    ?>
    <?php
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs WHERE jobs.Salary BETWEEN '$searchmin' AND '$searchmax' AND clocation = '$searchlocation' AND jobs.Sector  = '$searchsector' AND jobs.Type = '$searchtype'";
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    ?>
    Please help... ... pulling my hair out!
    Thanks

    Ok.. I've tried all methods and still not getting anywhere..
    David... following the link you gave me... and to the letter.. apart from GetSQLValueString()which does not seem to exist.
    All it does is return all the records (as per the basic recordset)
    Heres the code.... please please tell me where I am going wrong.... downloaded your book Foundation PHP but struggaling.,
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    $any = $_POST['any'];
    ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $expected = array('Sector' => 'text',
                      'clocation'         => 'text',
                      'minsalary'          => 'int',
                      'maxsalary'      => 'int');
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs";
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_search .= ' AND ';
          } else {
            $query_search .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_search .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_search .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_search .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    $queryString_jobsearch2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_jobsearch2") == false &&
            stristr($param, "totalRows_jobsearch2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_jobsearch2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_jobsearch2 = sprintf("&totalRows_jobsearch2=%d%s", $totalRows_jobsearch2, $queryString_jobsearch2);
    ?>

  • Default value in recordset variable

    Hi,
    I am using Dreamweaver 8.
    I am not sure that I understand the function of the default
    value in the variable area of the recordset. I'm using a search box
    and sending the result on through the url. If the person types
    something that is not in either of the two fields searched, is the
    default value supposed to kick in? I have tried entering a value of
    something that is actually in the field, but get a broken image
    (x)...I'm displaying images.
    What I would actually do is to display an error message on a
    different page. Is there a SQL statement that could be put after
    the search statement such &quot;if not....go to url or
    something&quot;? If not, I was thinking of creating a blank
    image with wording stating that there was no match.
    Current recordset code:
    SELECT*
    FROM images
    WHERE description LIKE %colname% OR picturenum = colname2
    ORDER BY picturenum ASC
    Name:colname
    Type:Text
    Default Value: montana (an actual word in the database)
    Run-Time Value: $_GET['description']
    Name:colname2
    Type:Text
    Default Value: A091 (an actual image in the database)
    Run-Time Value: $_GET['description']
    Current code works perfectly thanks to some direction by
    David Powers....thanks David.
    Any help would be appreciated.
    Thanks,
    Cliff

    The best way to accomplish this is to build the WHERE clause dynamically, or else have a different WHERE clause that you use in these situations. In other words, test the value of the querystring variables and if they are empty,  use a different WHERE clause that does not include the address  condition.
    Also, this question belongs in the app dev forum.

  • Updateable recordset from a stored procedure

    I would like to retrieve an updateable recordset from a stored procedure using the oracle 9.2.0.2.0
    oledb provider
    I am using the sample code/tables provided from Oracle.
    Does anyone have an example or has actually created an updatedable recordset from a stored procedure ?

    Assuming your stored procedure is returning a REF CURSOR, it cannot be done. Oracle's REF CURSORS are read only constructs.
    Justin

  • 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>

  • RecordSet  to Cusror Conversion Help Needed

    Hi,
    I have a Perl Code which calls a Stored Procedure in Oracle 8i Database. As you know that you can return Cursors
    and other data types back to Perl and not RecordSets. So I am trying to convert a RecordSet to a Cursor. The Stored
    Procedure Does some complex computations and then stores the results in a record Set. I need to tansfer the data
    from the Record Set back to the Perl Code via a REF Cusror. The only solution that I can think of is Creating a Temp
    Table to store the results and then point a Cursor to that and return that Cusror to the Perl Code. Is there any other
    way of doing this???. I searched lot of sites/forums, But couldnt find any solution.
    You Help will be greatly appreciated :).
    Thanks
    Rajesh

    Hi Rajesh,
    i too had the same requirement but using Java Code.
    One way to return a Cursor to the code is using a package.
    the query which returns the recordset is to be assigned to a ref cursor. For eg.
    CREATE OR REPLACE PACKAGE PKG_PLAN AS
    TYPE RESULT IS REF CURSOR;
    PROCEDURE USERDETAILS2 (
    O_RESULT OUT RESULT
    END PKG_PLAN;
    CREATE OR REPLACE PACKAGE BODY PKG_PLAN AS
    PROCEDURE USERDETAILS2(
                   O_RESULT OUT RESULT
    AS
    BEGIN
    OPEN O_RESULT FOR SELECT DISTINCT US_FIRSTNAME AS UserName,
    US_COMPANYNAME AS Company, TBLUSER.US_PRIMARYEMAIL AS EmailId ,
    FROM
    TBLUSER where
    TBLUSER.US_STATUS = 'A' ORDER BY UserName;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('INSIDE EXCEPTION');
    END USERDETAILS2;
    END PKG_PLAN;
    and in the perl code u will invoke the procedure as
    CALL PKG_PLAN.USERDETAILS2(?)
    where ? is the out parameter -of type cursor which is to be
    registered via perl code.(not sure how it is done in perl)
    and after issuing execute command via perl code
    get the resultset.
    hope u understood it and the above was of help.
    Good luck
    Rani
    Hi,
    I have a Perl Code which calls a Stored Procedure in Oracle 8i Database. As you know that you can return Cursors
    and other data types back to Perl and not RecordSets. So I am trying to convert a RecordSet to a Cursor. The Stored
    Procedure Does some complex computations and then stores the results in a record Set. I need to tansfer the data
    from the Record Set back to the Perl Code via a REF Cusror. The only solution that I can think of is Creating a Temp
    Table to store the results and then point a Cursor to that and return that Cusror to the Perl Code. Is there any other
    way of doing this???. I searched lot of sites/forums, But couldnt find any solution.
    You Help will be greatly appreciated :).
    Thanks
    Rajesh

  • Requerying a report after an insert button is presses on a form

    We have created an On-line Registration system using Portal. A student runs a report displaying courses from which they can register from to add to their profile.
    We would like to have the report requeryed after the client has clicked on the insert button on the form (that was called from the report).
    Otherwise the student stays at the insert screen and need to use the browser back button. Does any one have a suggestion or example which they wouldn't mind sharing to help us overcome this problem.
    Thanks Paul

    Paul,
    You may want to search the Oracle9iAS Portal Applications forum for an answer to your question, but to give you a pointer.
    In your form, you have a textbox called "Upon Successfull Submission" .. you would call your report here. Most likely using a redirect procedure or just calling it directly.
    You will definitely be able to get more information from the other discussuion forum though.
    Sue

  • How to change recordset bahaviour to accept dynamic column names in the where clause

    Hi
    im using php-mysql and i make a recordset and i want to make the column names in the where clause to be dynamic like
    "select id,name from mytable where $tablename-$myvar";
    but when i do this my i break the recordset and it disappear
    and when i use variables from advanced recordset it only dynamic for the value of the column not for the column name
    and when i write the column name to dynamic as above by hand it truns a red exclamation mark on the server behaviour panel
    so i think the only way is to change the recordset behaviour is it? if so How to make it accept dynamic column names?
    thanks in advance.

    As bregent has already explained to you, customizing the recordset code will result in Dreamweaver no longer recognizing the server behavior. This isn't a problem, but it does mean that you need to lay out your dynamic text with the Bindings panel before making any changes. Once you have changed the recordset code, the Bindings panel will no longer recognize the recordset fields.
    Using a variable to choose a column name is quite simple, but you need to take some security measures to ensure that the value passed through the query string isn't attempting SQL injection. An effective way of doing this is to create an array of acceptable column names, and check that the value matches.
    // create array of acceptable values
    $valid = array('column_name1', 'column_name2', 'column_name3');
    // if the query string contains an acceptable column name, use it
    if (isset($_GET['colname']) && in_array($_GET['colname'], $valid)) {
      $col = $GET['colname'];
    } else {
      // set a default value if the submitted one was invalid
      $col = 'column_name1'
    You can then use $col directly in the SQL query.

Maybe you are looking for