Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Database Search :very important


Message #1 by arshad siddiqui <ash_arshad@y...> on Tue, 12 Mar 2002 22:55:20 -0800 (PST)
Hi,

I know how to do database search with recordset

paging.

But the problem is that suppose I want to search the

database with three searches then how to do it with

paging.Let me explain it in detail

Suppose there are three text boxes :

1.Country

2. singer

3. title

I have a table in database with these columns.Now I

want to search the database with all the combinations

with paging too.

suppose I put country name and nothing in singer and

title ,it should display the records for that country

with no of pages.



I am making it like this:

if(singer="" and title="") then

rs.open sql

-

-

if(country="" and title="")then

rs.open sql1



and so on-----



The main problem is paging.I am able to display the

records but paging is not correct.



Please help me

Its urjent

Thanks

Regards

--Arshad--





__________________________________________________

Do You Yahoo!?

Try FREE Yahoo! Mail - the world's greatest free email!

http://mail.yahoo.com/

Message #2 by "Ken Schaefer" <ken@a...> on Fri, 15 Mar 2002 17:36:47 +1100
You need to pass the parameters that the user selected from page to page,
either via the querystring, or in hidden form elements, eg:

<a
href="results.asp?page=<%=intPage%>&Country=<%=Server.URLEncode(strCountry)%
>">Next Page</a>

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "arshad siddiqui" <ash_arshad@y...>
Subject: [asp_databases] Database Search :very important


: Hi,
: I know how to do database search with recordset
: paging.
: But the problem is that suppose I want to search the
: database with three searches then how to do it with
: paging.Let me explain it in detail
: Suppose there are three text boxes :
: 1.Country
: 2. singer
: 3. title
: I have a table in database with these columns.Now I
: want to search the database with all the combinations
: with paging too.
: suppose I put country name and nothing in singer and
: title ,it should display the records for that country
: with no of pages.
:
: I am making it like this:
: if(singer="" and title="") then
: rs.open sql
: -
: -
: if(country="" and title="")then
: rs.open sql1
:
: and so on-----
:
: The main problem is paging.I am able to display the
: records but paging is not correct.
:
: Please help me
: Its urjent
: Thanks
: Regards
: --Arshad--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  Return to Index