DBAsupport.com Forums - Powered by vBulletin
Results 1 to 1 of 1

Thread: duplicate filter in ado database

  1. #1
    Join Date
    Apr 2004
    Posts
    1

    Wink duplicate filter in ado database

    Please , i am tried to duplicate the filter of this code.But it not working. Probably the code is not correct. Can someone tell me where is wrong?Sorry I am totally beginner!!!thanks.
    Code:
    
    
    
    <%
    
    dim Type1
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\pechita2\db\login.mdb")
    
    set rs=Server.CreateObject("ADODB.recordset")
    sql="SELECT DISTINCT Type FROM property ORDER BY Type"
    sql="SELECT DISTINCT Type FROM property ORDER BY Area"
    rs.Open sql,conn
    
    Type1=request.form("Type")
    Area=request.form("Area")
    %>
    
    
    Choose Type
    Choose Type
    <% if Type1<>"" then sql="SELECT propertyref,Area,Type,Price FROM property WHERE Type='" & Type1 & "'" set rs=Server.CreateObject("ADODB.Recordset") rs.Open sql,conn if Area<>"" then sql="SELECT propertyref,Area,Type,Price FROM property WHERE Area='" & Area & "'" set rs=Server.CreateObject("ADODB.Recordset") rs.Open sql,conn %> %> <% do until rs.EOF response.write("") response.write("") response.write("") response.write("") response.write("") response.write("") rs.MoveNext loop rs.close conn.Close set rs=Nothing set conn=Nothing%>
    propertyref Area Type Price
    " & rs.fields("propertyref") & "" & rs.fields("Area") & "" & rs.fields("Type") & "" & rs.fields("Price") & "
    <% end if %>
    Last edited by marist89; 04-23-2004 at 09:48 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width