I have a database. I want to have a form where the user puts in an area code and it uses that value to search the PHONE field. How do I use the wildcard of * with the value from the from?
This is the code I have tried so far..
<form name="form" method="post" action="">
<p>
Record#:
<input type="text" name="ID">
<input type="submit" name="Submit" value="Delete Record">
</p>
</form>
<%
Dim Conn, RS, PMID
PMID = Request.Form("ID")
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
Conn.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("zip.mdb"))
sql = "Select * from Dealer WHERE Phone Like" & PMID'*"
Conn.execute(sql)
Conn.Close
%>
</body>