Guest_imported
New member
- Jan 1, 1970
- 0
Excuse my language it is week
I need help in a search in a column
The search is good I can search and get the result
But my problem is when I first open the page it display a table with a search ( there will be 100 rows) and I don’t want it to do that
I want to have nothing except the search submit button and the text field
Or at least the just the search submit button , the text field and the header of the table
Here is the script
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL,vGENRE
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("sstitle"
objConn.Open "File Name=D:\ASP_dir\myconnection.udl"
genSQL = "Select title,released,rating,review from movies where title like upper('%"&vGENRE&"%')"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
response.write("<form action=' method='POST'>"
response.write("<INPUT TYPE=TEXT NAME='sstitle' size=25>"
response.write("</select>"
response.write("<input type='submit' value='<-- Search for movie'>"
response.write("</form>"
%>
<%
response.write("<body style='border-style: outset; border-width: 2'><table border=1 cellspacing=1 width=100% id='AutoNumber1' style=color: #FFFFFF; border-style: groove; border-width: 3 bordercolor=#DFCAAA bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF bgcolor=#D7EAE7>"
response.write("<TR>"
response.write("<TD align=left height=20 width='55%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Title</font></big></TD>"
response.write("<TD align=left height=20 width='15%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Released Year</font></big></TD>"
response.write("<TD align=left height=20 width='20%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Rating</font></big></TD>"
response.write("<TD align=left height=20 width='10%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Review</font></big></TD>"
response.write("</TR>"
%> <%
while not genRS.eof
response.write("<TR>"
response.write("<TD>" & genRS("title"
& "</TD>"
response.write("<TD>" & genRS("released"
& "</TD>"
response.write("<TD>" & genRS("rating"
& "</TD>"
response.write("<TD>" & genRS("review"
& "</TD>"
response.write("</TR>"
genRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
objConn.close
Set GenRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</HTML>
I need help in a search in a column
The search is good I can search and get the result
But my problem is when I first open the page it display a table with a search ( there will be 100 rows) and I don’t want it to do that
I want to have nothing except the search submit button and the text field
Or at least the just the search submit button , the text field and the header of the table
Here is the script
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL,vGENRE
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("sstitle"
objConn.Open "File Name=D:\ASP_dir\myconnection.udl"
genSQL = "Select title,released,rating,review from movies where title like upper('%"&vGENRE&"%')"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
response.write("<form action=' method='POST'>"
response.write("<INPUT TYPE=TEXT NAME='sstitle' size=25>"
response.write("</select>"
response.write("<input type='submit' value='<-- Search for movie'>"
response.write("</form>"
%>
<%
response.write("<body style='border-style: outset; border-width: 2'><table border=1 cellspacing=1 width=100% id='AutoNumber1' style=color: #FFFFFF; border-style: groove; border-width: 3 bordercolor=#DFCAAA bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF bgcolor=#D7EAE7>"
response.write("<TR>"
response.write("<TD align=left height=20 width='55%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Title</font></big></TD>"
response.write("<TD align=left height=20 width='15%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Released Year</font></big></TD>"
response.write("<TD align=left height=20 width='20%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Rating</font></big></TD>"
response.write("<TD align=left height=20 width='10%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Review</font></big></TD>"
response.write("</TR>"
%> <%
while not genRS.eof
response.write("<TR>"
response.write("<TD>" & genRS("title"
response.write("<TD>" & genRS("released"
response.write("<TD>" & genRS("rating"
response.write("<TD>" & genRS("review"
response.write("</TR>"
genRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
objConn.close
Set GenRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</HTML>