:) You're going to like this question (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


mesturee -> :) You're going to like this question (9/7/2005 13:38:18)

I have a search page that has multiple forms/fields. Half of the fields are searched individually, the other half are grouped into one form and need a "and/or" relationship.

Let me explain...the fields are: Casing Size, Customer, Predicted load, Water Depth, etc..

Someone might need to search for a certain casing size, or a certain water depth at the same time.

Or they may need to search for a combination of a particular Customer, and a predicted load.

The query that I wrote has a deafult of AND. So I am thinking of maybe a radio button that will allow one of the fields to be searched as an OR.

I do not know how to work with radio buttons, so I don'y know where to begin. I do not think that many people will need the OR function......but I have been told that it needs to be included.

Here is my code (note that there are radiobuttons but they dont do anything.)
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Back to Landing String Analysis Main</title>
</head>

<body>

<p align="left"> </p>
<p align="left"> </p>
<p align="center"><font size="6" color="#000080"><b> Job Search</b></font></p>
<p align="center"><br>
</p>
<p align="center"> </p>
<div align="center">
  <center>
  <table border="1" width="825">
    <tr>
      <td width="100%" colspan="2">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
          bot="SaveResults" endspan -->
          <p align="center"><b><u>Job Number</u>    <nobr><select NAME="JobNumber" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"JobNumber")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select></nobr>            <input type="submit" value="Submit" name="B2"></b></p>
        </form>
      </td>
    </tr>
    <tr>
      <td width="50%">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="1"><!--webbot
          bot="SaveResults" endspan -->
          <p align="left"><b>     <u>Engineer</u>         
          <nobr><select NAME="Engineer" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"Engineer")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select></nobr>               
            <input type="submit" value="Submit" name="B1"></b></p>
        </form>
      </td>
      <td width="50%" rowspan="2">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="2"><!--webbot
          bot="SaveResults" endspan -->
          <p align="left"><b>     <u>Date</u>    
                    from    
             <input type="text" name="datefrom" size="9">       
          (ex 08/2003)<br>
                        
                        
          to           <input type="text" name="dateto" size="9">           
          <input type="submit" value="Submit" name="B1"></b></p>
        </form>
      </td>
    </tr>
    <tr>
      <td width="50%">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="3"><!--webbot
          bot="SaveResults" endspan --><p><b>     <u>Location</u>          
          <nobr><select NAME="LocationBlock" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"LocationBlock")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select></nobr></b>                        
          <input type="submit" value="Submit" name="B1"></p>
        </form>
      </td>
    </tr>
    <tr>
      <td width="50%">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="4"><!--webbot
          bot="SaveResults" endspan --><p><b>     <u>Rig / Vessel</u></b>    
          <nobr><select NAME="RigVesselName" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"RigVesselName")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select></nobr><b>     </b><input type="submit" value="Submit" name="B1"></p>
        </form>
      </td>
      <td width="50%">
        <form method="POST" action="--WEBBOT-SELF--">
          <!--webbot bot="SaveResults" startspan
          U-File="_private/form_results.txt" S-Format="TEXT/CSV"
          S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="5"><!--webbot
          bot="SaveResults" endspan --><p><b>     <u>Well Name</u></b>                 
          <nobr><select NAME="WellName" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"WellName")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select></nobr><b>             
            <input type="submit" value="Submit" name="B1"></b></p>
        </form>
      </td>
    </tr>
  </table>
  </center>
</div>
<form method="POST" action="Results_Job/jobCasingSizeresults.asp">
  <div align="center">
    <center>
    <table border="1" width="825" height="275">
      <tr>
        <td width="50%" height="44"><b>     <u>Casing Size</u></b>     
          <nobr><select NAME="CasingSize" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"CasingSize")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select>   </nobr><input type="radio" value="V9" checked name="R1">or</td>
        <td width="50%" height="95" rowspan="3" valign="top">
          <p align="left"><b><br>
                   
              
                    <u>Predicted Tensile
          Load at TD</u>     </b><input type="radio" value="V6" name="R1">or</p>
          <p align="left"><b>           
          Between   <input type="text" name="TensileLoadfrom" size="9" value="0">     and  
          <input type="text" name="TensileLoadto" size="9" value="2000000">    
          </b>   <br>
                             
               
          ex.  750000           
          ex.    1250000</p>
        </td>
      </tr>
      <tr>
        <td width="50%" height="44"><b>     <u>Customer
          Company</u></b>       <nobr><select NAME="CustomerCompany" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"CustomerCompany")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select>   </nobr><input type="radio" value="V8" name="R1">or</td>
      </tr>
      <tr>
        <td width="50%" height="44"><b>     <u>Slip Type</u>   </b>    <b>             
          <nobr><select NAME="SlipType" SIZE="1">
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn1.inc" --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62210" endspan -->
            <option><%=FP_FieldHTML(fp_rs,"SlipType")%></option>
            <!--webbot bot="AspInclude" startspan CLIENTSIDE
            U-INCFILE="_fpclass/fpdbrgn2.inc" --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot
            bot="AspInclude" i-CheckSum="62218" endspan -->
          </select>     </nobr></b><input type="radio" value="V7" name="R1">or</td>
      </tr>
      <tr>
        <td width="50%" height="113" valign="top"><br>
          <b>                              
          <u>Setting Depth</u>  (in ft.)    </b><input type="radio" value="V4" name="R1">or<p align="left"><b>           
          Between
             <input type="text" name="SettingDepthfrom" size="9" value="0">     and  
          <input type="text" name="SettingDepthto" size="9" value="50000">    
          </b> <br>
                           
                 
          ex.  10000               
          ex.    22000</p>
        </td>
        <td width="50%" height="125" valign="top">
          <p align="left"><b> <br>
                  
              
                           
          <u>Water Depth</u>  (in ft.)      </b><input type="radio" value="V5" name="R1">or</p>
          <p align="left"><b>           
          Between
             <input type="text" name="WaterDepthfrom" size="9" value="0">     and  
          <input type="text" name="WaterDepthto" size="9" value="50000">    
          </b> <br>
                            
                
          ex.   3000               
          ex.     5000</p>
        </td>
        <%fp_sQry="SELECT JobNumber, Engineer, Date, CustomerCompany, Contact, CostEstimate, CasingSize, SlipType, WellName, RigVesselName, TensileLoad, LocationBlock, WaterDepth, SettingDepth, LandingStringDetails, ScopeWork, Mudweight FROM LSjob WHERE (TensileLoad BETWEEN ::TensileLoadfrom:: AND ::TensileLoadto::) AND (WaterDepth BETWEEN ::WaterDepthfrom:: AND ::WaterDepthto::) AND (SettingDepth BETWEEN ::SettingDepthfrom:: AND ::SettingDepthto::) AND (CasingSize = ::CasingSizeddb::) AND (CustomerCompany = ::CustomerCompanyddb::) AND (SlipType = ::SlipTypeddb::)"
        %>
      </tr>
    </table>
    </center>
  </div>
  <table>
    <tbody>
      <tr>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="JobNumber" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>JobNumber<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>JobNumber<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"JobNumber")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="20490" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="Engineer" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>Engineer<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>Engineer<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"Engineer")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="16047" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="Date" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>Date<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>Date<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"Date")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="3267" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="CustomerCompany" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>CustomerCompany<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>CustomerCompany<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"CustomerCompany")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="39875" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="Contact" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>Contact<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>Contact<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"Contact")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="13525" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="CostEstimate" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>CostEstimate<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>CostEstimate<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"CostEstimate")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="31146" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="CasingSize" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>CasingSize<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>CasingSize<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"CasingSize")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="27618" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="SlipType" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>SlipType<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>SlipType<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"SlipType")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="16519" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="WellName" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>WellName<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>WellName<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"WellName")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="15610" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="RigVesselName" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>RigVesselName<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>RigVesselName<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"RigVesselName")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="32195" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="TensileLoad" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>TensileLoad<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>TensileLoad<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"TensileLoad")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="28257" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="LocationBlock" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>LocationBlock<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>LocationBlock<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"LocationBlock")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="33971" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="WaterDepth" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>WaterDepth<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>WaterDepth<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"WaterDepth")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="29139" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="SettingDepth" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>SettingDepth<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>SettingDepth<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"SettingDepth")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="31017" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="LandingStringDetails" b-tableformat="TRUE" b-hasHTML="FALSE"
          clientside
          local_preview="<font size="-1">&lt;&lt;</font>LandingStringDetails<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>LandingStringDetails<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"LandingStringDetails")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="57986" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="ScopeWork" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>ScopeWork<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>ScopeWork<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"ScopeWork")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="19547" endspan -->
        </td>
        <td><!--webbot bot="DatabaseResultColumn" startspan
          s-columnnames="JobNumber,Engineer,Date,CustomerCompany,Contact,CostEstimate,CasingSize,SlipType,WellName,RigVesselName,TensileLoad,LocationBlock,WaterDepth,SettingDepth,LandingStringDetails,ScopeWork,Mudweight"
          s-column="Mudweight" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
          local_preview="<font size="-1">&lt;&lt;</font>Mudweight<font size="-1">&gt;&gt;</font>"
          preview="<font size="-1">&lt;&lt;</font>Mudweight<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"Mudweight")%><!--webbot
          bot="DatabaseResultColumn" I-CheckSum="21742" endspan -->
        </td>
      </tr>
    </tbody>
  </table>
  <p align="center"><input type="submit" value="Submit" name="DetailsSubmit">           
               
  <input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>


I do have a couple of other questions....actually quite a few.

If anyone could suggest any reading material that they think would help me out, that would be great. I kind of had to jump into this and learn to swim along the way.

Thanks for any help.




rubyaim -> RE: :) You're going to like this question (9/7/2005 19:50:03)

quote:

The query that I wrote has a default of AND. So I am thinking of maybe a radio button that will allow one of the fields to be searched as an OR.


In the current format, I think it's your query that will need to be amended - if AND is used then it will expect all those field to match, so perhaps using OR would work. See SQL AND & OR - The AND operator displays a row if ALL conditions listed are true. The OR operator displays a row if ANY of the conditions listed are true.

If you do a quick modification to your current page by changing the query to read OR (in the 'criteria' part of the DRW), does it start to return the results you would like to see or do things get a little messy?

If it's not returning what you need, you may need to consider splitting this up a little. For larger searches I tend to have the form(s) on one page, and then return the results on another - it seems a little easier to manage. Sometimes a couple of different result sets may be required.

If you put the page on the Spooky Diet you will probably find it much easier to play around with. Take a look at this thread - the macro is great.

There are some very good tutorials here:
http://www.outfront.net/spooky/index.htm

Hope the above make sense [:)]

Sally




mesturee -> RE: :) You're going to like this question (9/8/2005 15:28:41)

Thanks for responding.
I am going to need the AND operator. I will have a default option of ALL in the drop down boxes, and default values in the text boxes.

This will basically return all records when none of the fields are narrowed down.

I hope to have the results on another page. However, when I delete the results table, the query is deleted as well. So until I figure that one out, I am keeping the table there.

I am definately going to check out the spooky diet, thanks for the tip.

As far as what the page is returning...I seem to be having trouble with IIS. Whenever I post an .asp page, it cuts off half of the code. I'm trying to work that one out as well.

Thanks again for responding.




rubyaim -> RE: :) You're going to like this question (9/8/2005 17:46:35)

Hi, it may be cutting off as the actual results table is enclosed in one of the forms. When you move the results to another page you will have to pick up the 'fprs query' etc and move it as well. Sometimes it's easier just to run through the DRW again on a new page [:)]

Actually, the code for that page does not look quite like I'm used to seeing - I think there are parts missing (it's possible I'm wrong, am used to looking at FP2003 generated code). Perhaps you could delete it and start the DRW again? One form at a time may be the easiest way to troubleshoot this.

Did you create this originally using the FP Wizard to display a search form, or put the forms in and then the results table?

Re the .asp pages - are you getting any specific errors or is it just parts of the page missing?

Sally





mesturee -> RE: :) You're going to like this question (9/9/2005 10:20:53)

I am getting one error, but I am not sure what it means. This is in the source code, just after the cut off point.
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a000d'</font>
<p>
<font face="Arial" size=2>Type mismatch: 'FP_ReplaceQuoteChars'</font>
<p>
<font face="Arial" size=2>/herewego/_fpclass/fpdbrgn1.inc</font><font face="Arial" size=2>, line 35</font>

I tried searching for the error, but I didn't find anything.

Since you seem to know how to do this, let me ask you something.

I have a form. Inside the form is a drop down box (JobNumberddb), and a submit button (JobSubmit). The drop down box is a DRW query to an access database, that lists the distinct information in the JobNumber field.

When I use the DRW to create a query (say, select * where Jobnumber = ::JobNumberddb::) and finish the DRW....the results table is inserted into the form.

I have a results page (jobsearchresults.asp) I used the DRW on that page to create a table that lists all of the fields.

When I delete the results box from my form, the query is deleted with it.

My questions are; How do I get the query to stay with the form after I delete the DRW generated table? and How do I get the query to go to the results page when I hit submit?

I really appreciate your help, and if I don't catch you again today, Have a good weekend.




rubyaim -> RE: :) You're going to like this question (9/9/2005 22:53:33)

Hi, I really don't know much at all, but do know what it's like to have problems with these types of things ... it can get very frustrating especially when you are thrown in the deep end.

Unfortunately I have to work today but get Monday off [:)]. Hope your weekend went well.

As a test, try the following to set up a results page and a search page with a dropdown.

-------------
Start a new page.

Insert Database Results.

Work through the wizard.

In Step 3, select More Options then Criteria and add Job
Number Equals Job Number.

In Step 5 Untick 'Add search form' and finish.

Save the page as: jobresultstest.asp

-------------
Start another new page.

Insert Form.

Put your cursor in the form at the location you want your drop down, then go to Insert Database Results.

In Step 3 of the wizard, select Edit List.
Remove all the fields BUT the Job Number field from the
list.

In Step 4 of the wizard select 'Dropdown list' from the
results formatting options.

Finish the wizard.

Right click in your form.

Click on 'Form Options'.

Check the box 'Send to other' and then click on 'Options'.
In the 'Action' field, type in the name of your results
page (which is jobresultstest.asp). The form method
should be post.

Keep clicking OK until you leave the form options.

Save the page as: jobformtest.asp
-------------

Open your test search form page in the browser.

You should be able to select your job number from the dropdown, and then when you click submit, it will go to the jobresultstest.asp page and show you the results.

Basically all we are doing here is passing the job number from your search page to your results page and the results page should display the details of that job.

Is this what you are after? If so, the form and the results page can be built on to handle the other things you need.

You might find Spooky's notes on the DRW Steps handy.

Sally





mesturee -> RE: :) You're going to like this question (9/12/2005 12:25:33)

Thanks again. I actually figured I would try this method, minutes after posting the question. I have actually found the answer to 85% of my question by coming to this forum. I would send everybody some fresh baked cookies, but my oven doesn't work very well.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375