Solved

Passing Variables

Posted on 2000-03-12
1
137 Views
Last Modified: 2013-12-24
I am passing a variable (queryname) thru the URL, I use this to set the name of the query, i have a problem when I try to get the number of records coming back, I tried n permutations of
<cfset NumRows = #url.queryname#.recordcount>

gives me an error saying that the . before recordcount is invalid.

Any help appreciated.
0
Comment
Question by:ravisa
1 Comment
 
LVL 5

Accepted Solution

by:
nathans earned 50 total points
Comment Utility
After testing the below code
Replace your line
=============================
<cfset NumRows = #url.queryname#.recordcount>
=============================
with the below line.
=============================
<cfset NumRows = #url.queryname.recordcount#>
=============================

=============================
<CFQUERY NAME="url.qname" DATASOURCE="MyDatasource">
SELECT      EmployeeID, FirstName, LastName, Title
FROM         Employee
</CFQUERY>

<html>
<head>
      <title></title>
</head>

<body>
Both of the below worked.
<cfoutput>
#evaluate(url.qname.recordcount)#<br>
#url.qname.recordcount#
</cfoutput>

</body>
</html>
0

Featured Post

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now