Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Passing Variables

Posted on 2000-03-12
1
Medium Priority
?
183 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 200 total points
ID: 2612271
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
What You Need to Know when Searching for a Webhost Provider
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

972 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