Solved

Passing Variables

Posted on 2000-03-12
1
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
nathans earned 50 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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

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…
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 …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

628 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