PDA

Click to See Complete Forum and Search --> : DAO - I'm lost!!!


spg1
Aug 30th, 2000, 09:18 AM
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......

Clunietp
Aug 30th, 2000, 09:53 AM
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

spg1
Aug 30th, 2000, 10:12 AM
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?????

Clunietp
Aug 31st, 2000, 12:04 AM
Server side ASP code is always hidden

here is a good place to start for a tutorial

http://www.4guysfromrolla.com/webtech/faq/faqtoc.shtml#Databases