Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find or search oracle column using ASP

Status
Not open for further replies.

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(&quot;ADODB.Connection&quot;)
Set GenRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)


vGENRE = request.form(&quot;sstitle&quot;)
objConn.Open &quot;File Name=D:\ASP_dir\myconnection.udl&quot;



genSQL = &quot;Select title,released,rating,review from movies where title like upper('%&quot;&vGENRE&&quot;%')&quot;
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText



response.write(&quot;<form action=' method='POST'>&quot;)




response.write(&quot;<INPUT TYPE=TEXT NAME='sstitle' size=25>&quot;)
response.write(&quot;</select>&quot;)
response.write(&quot;<input type='submit' value='<-- Search for movie'>&quot;)
response.write(&quot;</form>&quot;)

%>


<%

response.write(&quot;<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>&quot;)
response.write(&quot;<TR>&quot;)
response.write(&quot;<TD align=left height=20 width='55%' bgcolor='#A7D1CB'>&quot;)
response.write(&quot;<big><font color='#5E85B0'>Title</font></big></TD>&quot;)
response.write(&quot;<TD align=left height=20 width='15%' bgcolor='#A7D1CB'>&quot;)
response.write(&quot;<big><font color='#5E85B0'>Released Year</font></big></TD>&quot;)
response.write(&quot;<TD align=left height=20 width='20%' bgcolor='#A7D1CB'>&quot;)
response.write(&quot;<big><font color='#5E85B0'>Rating</font></big></TD>&quot;)
response.write(&quot;<TD align=left height=20 width='10%' bgcolor='#A7D1CB'>&quot;)
response.write(&quot;<big><font color='#5E85B0'>Review</font></big></TD>&quot;)
response.write(&quot;</TR>&quot;)
%> <%
while not genRS.eof

response.write(&quot;<TR>&quot;)
response.write(&quot;<TD>&quot; & genRS(&quot;title&quot;) & &quot;</TD>&quot;)
response.write(&quot;<TD>&quot; & genRS(&quot;released&quot;) & &quot;</TD>&quot;)
response.write(&quot;<TD>&quot; & genRS(&quot;rating&quot;) & &quot;</TD>&quot;)
response.write(&quot;<TD>&quot; & genRS(&quot;review&quot;) & &quot;</TD>&quot;)
response.write(&quot;</TR>&quot;)
genRS.movenext
Wend

response.write(&quot;</table></BIG>&quot;)

GenRS.close
objConn.close
Set GenRS = Nothing
Set objConn = Nothing

%>

<BR><HR>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top