|
|
Simple Database Query
<%
searchword=Request("inputword")
Dim objConn
Dim objRec
Dim strConn
authorSQL = "SELECT au_lname From authors;"
author1SQL = "SELECT * From authors WHERE au_lname LIKE '" & searchword &"%';"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRec = Server.CreateObject("ADODB.Recordset")
objConn.Open strConnect
%>
These are the authors in our Database. Enter the first letter of their name
for more information about that particular author
<%
ObjRec.Open authorSQL,objConn
while Not objRec.EOF
Response.Write (objRec("au_lname") & " ")
objRec.MoveNext
Wend
objRec.Close
%>
|