Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: viewing the requested data


Message #1 by tim.puffer@t... on Thu, 11 Oct 2001 19:37:59
my problems is the data that i am requesting from the asp page dose not 

show up. the page displays everything but the results of the search. 



any help is appreciated, this is my first attemp at this.





if Request.QueryString("view") = "All" then

	set rsdblst = rscn.Execute("select * from booking")

	TheMessage = "All Bookings"

else

	set rsdblst = rscn.Execute("select * from booking where " _

	& Request.Form("In") & (" Like '*") _

	& Request.Form("Find") & ("*'"))

	TheMessage = "Search Results"



 <<<i left the html junk out of the middle here>>>





	 <TR VALIGN="top" ALIGN="left">

		<TD WIDTH=131><P><FONT COLOR="#000000"><% Response.Write 

rsdblst ("tdydate") %></FONT></TD>



		<TD WIDTH=131><P><FONT COLOR="#000000"><% Response.Write 

rsdblst("rptunit") %></FONT></TD>



		<TD WIDTH=158><P><FONT COLOR="#000000"><% Response.Write 

rsdblst("custnam") %></font></TD>



		<TD WIDTH=130><P><FONT COLOR="#000000"><% Response.Write 

rsdblst("endusrnam") %></FONT></TD>



		<TD WIDTH=130 ><p><FONT COLOR="#000000"><% Response.Write 

rsdblst("equipdesc") %></FONT></TD>

		

		<TD WIDTH=130 ><P><FONT COLOR="#000000"><% Response.Write 

rsdblst("curamt") %></FONT></TD>



	 </TR>

<%

	rsdblst.MoveNext

loop

%>		 
Message #2 by "Jose Bueno" <jbueno@i...> on Thu, 11 Oct 2001 20:30:02
I believe your problem is that you're trying to use both the 

request.querystring and request.form methods of the request object.  I do 

not believe you can use both at the same time.  If you are using 

method=GET in your search page form, then you need to use 

request.querystring. Alternately (and I prefer this) use method=POST and 

use the request.form action.

Message #3 by "PUFFER, TIM" <TIM.PUFFER@T...> on Thu, 11 Oct 2001 15:45:32 -0500
I tried the your suggestion below and it did not make a difference.



on the search page my method and action code looks like this.



<FORM ACTION="results.asp"  METHOD=POST>



I appreciate the help.





-----Original Message-----

From: Jose Bueno [mailto:jbueno@i...]

Sent: Thursday, October 11, 2001 3:30 PM

To: Access ASP

Subject: [access_asp] Re: viewing the requested data





I believe your problem is that you're trying to use both the 

request.querystring and request.form methods of the request object.  I do 

not believe you can use both at the same time.  If you are using 

method=GET in your search page form, then you need to use 

request.querystring. Alternately (and I prefer this) use method=POST and 

use the request.form action.
Message #4 by "Jose Bueno" <jbueno@i...> on Thu, 11 Oct 2001 22:39:18
Okay... I saw you replied to me in another thread, but try this...



----------------------------------------

<HTML>

<BODY>

<FORM Action='search.asp Method='POST'>

	<INPUT TYPE="text" 

		NAME="Find" 

		SIZE=28

		MAXLENGTH=50>

	</INPUT>

	</BR>

	<SELECT NAME="in" size="1" >

		<OPTION VALUE="all">

			Show All Records

		</OPTION>

		<OPTION VALUE="tydate">

			Date

		</OPTION>

		<OPTION VALUE="rptunit">

			Reporting Unit

		</OPTION>

		<OPTION VALUE="rptunitordrno">

			Reporting Unit Order Number

		</OPTION>

		<OPTION VALUE="custnam">

			Customers Name

		</OPTION>

      <OPTION  value="enusrnam">

			End Users Name

		</OPTION >

      <option value="equipdesc">

			Equipment Description

		</OPTION >

      <OPTION  value="fiscwk">

			Fiscal Week

		</OPTION >

	</SELECT>



--------------------------------------------------

<%



dimension your variables and connection object



dim strSql



if request.form in = "all" then

	strSql = "SELECT * FROM booking"

else

	strSql = "Select * FROM booking WHERE "

	strSql = strSql & Request.Form("In") & (" Like '*")

	strSql = strSql & Request.Form("Find") & ";"

End If



recordset.open (strSQL, connection)



	While not Recordset.EOF

		yadda

		yadda

		recordset.movenext

	Wend



%>
Message #5 by "Jose Bueno" <jbueno@i...> on Fri, 12 Oct 2001 12:49:04

dOh!  Just realized I made two errors in the sample



>if request.form in  = "all" then



should be:



>if request.form("in") = 1 then

Message #6 by "Jose Bueno" <jbueno@i...> on Fri, 12 Oct 2001 13:50:08
OK... one more time... maybe I'll get it right :)



>if request.form("in") = "all" then




  Return to Index