navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Return Search Count

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Return Search Count
Page: [1]
 
Kicker3

 

Posts: 28
From: Tampa FL USA
Status: offline

 
Return Search Count - 4/2/2001 20:39:00   
I am sure this is simple, but I can't seem to find an answer to my question when I search the forum.

How do I get the database to return a record count of the items that are in the current search results?

For example, I go to the website...I search for my criteria...I want to know how many matches there are?

I am using ASP with MS Access 2000 and Front page 2000.

Thanks,
Ben

[This message has been edited by Kicker3 (edited 04-02-2001).]

Olds442

 

Posts: 47
From: UK
Status: offline

 
RE: Return Search Count - 4/2/2001 20:16:00   
Check out:

http://www.outfront.net/spooky/advanced.htm

I just found it!

------------------
Regards

Olds442

- The trouble with the rat race is - even if you win you're still a rat!


(in reply to Kicker3)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Return Search Count - 4/2/2001 20:23:00   
If you are using the DRW and are looking for the count of the results use:

FP_iCount

Something like <%=Response.Write(FP_iCount)%>

It has to go AFTER the DRW though...


(in reply to Kicker3)
Kicker3

 

Posts: 28
From: Tampa FL USA
Status: offline

 
RE: Return Search Count - 4/2/2001 20:22:00   
Thanks for the help.

I got the response using the "FP_iCount" method.

However, just like you said: "I can't get the results to work before the DRW".

Is there a way or some other method I could use to get the count returned prior to the DRW.

I have seen it on sites before where it says:
"You Searched Returned ### Records" and then it lists the records beneath.

Help...


(in reply to Kicker3)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Return Search Count - 4/2/2001 23:03:00   
I don't know how to do it with using the DRW.

I have done it by dropping the DRW and building it myself using ASP. Using Access2000 you can do it by using a scrollable cursor.

Actually the Keyset cursor.

Maybe Spooky knows how using the DRW, but I am not sure FP is flexable enough to allow it.

Joe


(in reply to Kicker3)
KCIWebMaster

 

Posts: 524
From: Fredericksburg VA USA
Status: offline

 
RE: Return Search Count - 4/2/2001 17:32:00   
Help!

I have almost exactly the same question but can't seem to figure out how to apply these answers to my situation. I am not using the DRW, only ASP. I tried the FP_iCount method and that did not do anything. (BTW, I'm still using FP98.)

This is the first part of my code:
<%
Dim Connect,Query,ph,total,query2

Set Connect=Server.CreateObject("ADODB.Connection")
Connect.Open "ph","intranetuser","intra4fun"

Query="SELECT * FROM Table1 ORDER BY Table1.[reportdate]"

Set ph=Connect.Execute(Query)
%>

Then to display the results in a table (I'll skip the table headers):

<%
Dim x, bgcolor
On Error Resume Next
ph.MoveFirst
do while Not ph.eof
%>
<tr
<%
if x = 1 then
response.write "bgcolor='silver'"
x=2
Else
Response.write "bgcolor='white'"
x=1
End if %>>
<td><%=ph("reportdate")%></td>
<td<a
href="detail_history.asp?description=<%=ph("PHID")%>"><%=ph("Description")%></a></td>
<td><%=ph("status")%></td>
</tr>
<%
ph.MoveNext
Loop
%>

I tried adding
Query2="SELECT COUNT(*) FROM Table1
total=Connect.Execute(Query2)

and then display it with <%=total%>
but could get a result to display.

What am I missing/doing wrong?

Thanks in advance for any and all assistance!


(in reply to Kicker3)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Return Search Count - 4/2/2001 17:59:00   
I use:

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("your_db.mdb")
objConn.Open
Dim strSQL
strSQL="Select * FROM your_table"
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.open strSQL, objConn, adOpenKeySet
Response.Write "There were " & objRS.RecordCount & " records"
.
.
.

[This message has been edited by jbennett (edited 04-02-2001).]


(in reply to Kicker3)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Return Search Count
Page: [1]
Jump to: 1





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