Solved

Passing Variables

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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