Hej
jeg er ved at lave en opsætning ved hjælp af asp scritp der styre hvilke data der skal loades fra en access database.
jeg er kommet til at brugerne kan vælge at søge på fx. et land, by mm. hvorefter databasen vises i et nyt asp dokument. Men - for der er jo et men - i access databasen har jeg pr linie en værdi 1 eller 0 hvis værdien er 0 skal linie ikke indlæses i dette dokument, men i en andet dokument og det er så her jeg kommer til kort, og håber der er en der kan hjælpe lidt.
her er valgsiden:
<div id="leftcol" style="width: 145px" class="style12">
<p> </p>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="width: 131px">
<tr>
<td valign="middle" align="left" style="width: 128px">
<form method="POST" action="show-pro.asp">
<font face="Arial" size="1"> <select size="1" name="u_where" style="width: 125px" tabindex="1" class="style15">
<option value="Country" selected>Country</option>
<option value="City">City</option>
<option value="Shop_format">Shop format</option>
<option value="Delivery_address">Delivery address</option>
<option value="Order_No">Order No.</option>
<option value="Status">Status</option>
<option value="Shipping_date">Shipping date</option>
<option value="Expected_finish">Expected finish</option>
<option value="Opening_date">Opening date</option>
<!-- <option value="Go_to_project">Go to project</option>
<option value="Ordering">Ordering</option> -->
</select> </font>
<p>
<font face="Arial" size="1"> <input type="text" name="u_search" size="17" value="<%= u_search %>">
</font> <p>
<font face="Arial" size="1">
<input type="submit" value="Submit" class="style1" style="width: 125px"></font>
</td>
</form>
</tr>
</table>
</div>
<p> </p>
<p class="style13"><a href="show-all.asp" class="style14">Show all Orders</a></p>
hvis man foretager et valg kommer man hertil:
<%
u_search=request.form("u_search")
u_where=request.form("u_where")
if u_search = "" or u_where= "" then
response.redirect "input-pro.asp"
end if
accessdb="EMC5"
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * from PANDORA where " & u_where &" like '"& u_search & "'"
rs.Open sql, cn
If rs.eof then
search="nothing"
end if
%>
<head>
<title><%= sql %></title>
<p>
<%= sql %>
</p>
<% if search <> "nothing" then %>
<div align="left">
<table cellspacing="0" class="style20" cellpadding="0" style="width: 880px">
<tr class="style19">
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Country</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">City</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Shop
<br>
format</font></th>
<th width="200" valign="top" align="left" class="style20" ><font face="Arial" size="1">Delivery address</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Order No.</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Status</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Shipping date</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Expected finish</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Opening date</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Go
to project</font></th>
<th width="60" valign="top" align="left" class="style20" ><font face="Arial" size="1">Ordering</font></th>
</tr>
<% end if %>
<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<tr class="style19">
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Country") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("City") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Shop_format") %></font></td>
<td width="200" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Delivery_address") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Order_No") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Status") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Shipping_date") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Expected_finish") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Opening_date") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Go_to_project") %></font></td>
<td width="60" valign="top" align="left" class="style20" style="height: 27px">
<font face="Arial" size="1">
<%= rs("Ordering") %></font></td>
<%
rs.MoveNext
loop%>
<% if search = "nothing" then %>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="840">
<tr>
<td valign="top" align="left">
<font face="Arial" size="2">
No Search Results Matched <%= u_search %></font></td>
</tr>
<% end if %>
Her er det så jeg gerne skulle have den til at fravælge de linie hvor værdien er = 0
værdien findes i ovenstående database i kollonen OR_Status og er angivet til enten 1 eller 0
hvordan pokker får man det integreret i ovenstående kode??????
plz håber der er hjælp at hente
/maddog