|
| |
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
.asp search page question - 10/12/2002 11:19:40
Question: I created a search .asp page that uses the tfilter function. I want to search my Microsoft Access Database, but my tfilterfunction will not work if my ITEMLOC is null. Is there a way for this function to work weather it ITEMLOC is null or not? My code is below: <% tfilter = " WHERE (USERNAME = ' " & Request.Form(" ITEM_USERNAME" ) & " ' ) AND (ITEMLOC = ' " & Request.Form(" ITEM_LOC" ) & " ' ) " ' Response.Write tfilter & " <br>" %> Thanks, John316
|
|
|
|
Doug G
Posts: 1189 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: .asp search page question - 10/12/2002 12:00:34
Try something like this (I haven' t tested this code)
<%
dim strLoc
tfilter = " WHERE (USERNAME = ' " & Request.Form(" ITEM_USERNAME" ) & " ' )
strLoc = Request.Form(" ITEM_LOC" )
If IsNull(StrLoc) Then StrLoc = " "
If Len(StrLoc) > 0 Then
AND (ITEMLOC = ' " & strLoc & " ' ) "
End If
' Response.Write tfilter & " <br>"
%>
< Message edited by Doug G -- 10/11/2002 12:01:11 PM >
_____________________________
====== Doug G ======
|
|
|
|
John316
Posts: 214 Joined: 9/25/2002 Status: offline
|
RE: .asp search page question - 10/21/2002 11:30:50
Doug that code did not work. can you think of anything else? John316
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|