Results 1 to 4 of 4

Thread: DAO - I'm lost!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Angry

    I am trying to make a search button feature. I have 1 commmand button and one text box. I need to use the text box in order to obtain data to perform a search in my database. The button s going to initiate the search. How Do I create something like that? I need Help, Here is What I have=>
    my database is dealer.mdb and my table is table 1 which contains two fields : F1,F2....When F1 is entered in the text box, F2 should be the result displayed. I am real new to this so I would greatly appreciate all help and code :}
    I am using some dao people tell me....

    --------------------------------------------------------
    CODE:
    ----------------
    <%@ LANGUAGE="VBSCRIPT" %>
    <HTML>
    <HEAD>
    <TITLE>Untitled</TITLE>
    </HEAD>
    <BODY><%
    Dim DB
    Dim rst
    Set DB = OpenDatabase(" c:\www.mysite.com\db\dealer.mdb")
    Set rst = DB.TableDefs("Dealers").OpenRecordset
    %>
    <P>
    <FORM method="GET" action="zip.asp">&nbsp;
    <P><B>Enter a Zip-Code: </B><INPUT name=zip size="5" type="text"> <INPUT type=submit value="look it up"> </FORM>
    <BLOCKQUOTE></BLOCKQUOTE></TD><TD width="14" valign="top"><IMG height=1 src=""
    width=14> </TD></TR><TD colspan="4">&nbsp;
    <HR noShade SIZE=1>
    <%
    Value = Request.Querystring("zip")
    %>
    </BODY>
    </HTML>

    --------------------------------------------------

    Right now it's giving me an type mismatch error:
    -------------------
    Microsoft VBScript runtime error '800a000d'

    Type mismatch: '[undefined]'

    /test2.asp, line 10
    --------------------


    THANKS FOR YOUR HELP....
    I am about ready to give up......

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Where are you declaring your DAO objects? (set DB = server.createobject(....))

    You should not be using DAO on the server anyways, this is a big NO-NO. Use ADO instead

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Unhappy reply

    I've seen this done on a site =>
    http://www.weathershield.com/dealer/default.asp

    THATS EXACTLY WHAT I WANT!!!!!!!!!!!!

    but the code is hidden,,,,HOW?????

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Server side ASP code is always hidden

    here is a good place to start for a tutorial

    http://www.4guysfromrolla.com/webtec...html#Databases

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