Solved

Passing Variables

Posted on 2000-03-12
1
145 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XML problem with Internet Explorer 7 40
Resource Calculation for Website 4 56
How to stress test an ASP.NET https website 3 61
DNS @ Naked Domain Record 5 57
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A short film showing how OnPage and Connectwise integration works.

948 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

19 Experts available now in Live!

Get 1:1 Help Now