Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2007, 03:46 AM
Authorized User
 
Join Date: Aug 2006
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp searching and recordset paging

i have a search form where can let the user search by firstname(in text box) and department(in drop down)
i use a query like below, if theere have keyword the search based on condition while no keyword select all by default.
in this case, i cant query all the record again after i do the searching. i wan to query all the record again by slect the drop down menu that value is ALL. can u teach me how to qrite the query on it.?thanx.
Code:
if  strFirstname<>"" then

SQL="SELECT  A.empid, A.firstname,A.lastname,A.statusEmp,B.deptname,C.postname FROM tbl_employee A inner JOIN tbldepartment B ON A.department = B.deptid inner join tbl_position C on A.position=C.postid WHERE A.firstname LIKE '"&strFirstname&"%' AND A.department='"&strdepartment&"'"
else
SQL="SELECT  A.empid, A.firstname,A.lastname,A.statusEmp,B.deptname,C.postname FROM tbl_employee A LEFT OUTER JOIN tbldepartment B ON A.department = B.deptid LEFT OUTER JOIN tbl_position C ON A.position=C.postID order by A.department"
end if
plz help...thanx ya.:):)






Similar Threads
Thread Thread Starter Forum Replies Last Post
DB recordset paging using ajax paging? kumiko Classic ASP Basics 0 May 26th, 2008 10:23 AM
ASP | db recordset paging PLEASE HELP!! burns Classic ASP Basics 0 February 26th, 2006 09:43 AM
Recordset Paging incorrectly. Please help! phudong3da Dreamweaver (all versions) 4 October 4th, 2005 05:39 PM
Problem with recordset paging Stefania Classic ASP Databases 0 February 11th, 2005 08:59 AM
Problem in Recordset Paging zaeem Classic ASP Databases 2 October 15th, 2003 12:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.