navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
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

 

What am I not Seeing Here???

 
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 >> What am I not Seeing Here???
Page: [1]
 
pd_it_guy

 

Posts: 191
Joined: 3/4/2008
Status: offline

 
What am I not Seeing Here??? - 8/14/2008 18:55:46   
Trying to get a simple count of records, and display them. An identical SELECT works just fine. In fact, the only problem comes with pulling out the variable record_count. I get a type mismatch "rs" error, but only while trying to count. Is it the alias???

This does NOT work:

<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT COUNT (*) AS record_count FROM Name_alert WHERE (record_date > #01/01/2003#)"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="LegacyAlpha"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=13
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--#include file="_fpclass/fpdbrgn2.inc"-->

<%
record_count=FP_FieldVal(fp_rs,"record_count")
Response.Write(record_count)
%>
pd_it_guy

 

Posts: 191
Joined: 3/4/2008
Status: offline

 
RE: What am I not Seeing Here??? - 8/14/2008 19:55:39   
Oops, sorry, all, about the panic message. I found it.

WRONG WAY:

<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<%
record_count=FP_FieldVal(fp_rs,"record_count")
Response.Write(record_count)
%>


RIGHT WAY:

<!--#include file="_fpclass/fpdbrgn1.inc"-->
<%
record_count=FP_FieldVal(fp_rs,"record_count")
Response.Write(record_count)
%>

<!--#include file="_fpclass/fpdbrgn2.inc"-->

(in reply to pd_it_guy)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> What am I not Seeing Here???
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