RE: Query confusion - CF not recognising query name
Replies to all included; here's a real silly question but is cfset variables.IDCount=getPeopleInfo.RecordCount written exactly like this or is it written like cfset variables.IDCount=#getPeopleInfo.RecordCount# leaving the # off could be your problem. You are kidding, right? CF hasn't required the # within CFSET since v2 Have you run the query in a query analyzer? If so, does it return results? Also, are you catching a database error and not returning anything to the client? Not in Query Analyzer, but I know it does something as I've put some debugging code around it (getTickCount()) - but it should return 0 in the recordCount if it returns no records... It looks like your code has been greatly excerpted. There is no chance that you are setting the variable getPeopleInfo equal to some simple value and overwriting the query somewhere between the query and the loop? Is the name of the query dynamic? Sorry for the questions, but it seems very unlikely that ColdFusion would behave this way. Any additional information would be useful. These 2 commands of code are exactly as I pasted them, there isn't anything between them that could change it - I've changed the query name as well and it still does nothing... I just took out the and #PreserveSingleQuotes(variables.whereList)# --- set some variables and it worked fine for me. What's in the wherelist?? It ran fine for me. cf 4.01 on Windows 2000 server. OK, the variables.whereList contains things like "fieldName='Yes'" or "fieldName is NULL", I need the PreserveSingleQuotes otherwise it spits when you use apostrophies What about removing the "variables." scope? I even tried putting CFLOOP QUERY="getPeopleInfo" and it came back saying the query didn't exist Are you talking to SQL Server? I don't think it likes the table name "Users" Try putting square brackets around the table name, eg. "[Users]" and see if that helps. AND run it with debugging on to show the SQL and the result. This will let you know whether the SQL is actually being executed and how many rows it returns. SQL Server 7, otherwise the (nolock) wouldn't work - the table name isn't Users, that was Jeff's suggestion. I can't put debugging on as it's a production server - I don't have the data on my test machine to use, and the amount of data is huge to download As I said - it's confusing the hell out of me. Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
Why not put debugging on for your IP only??? I can't put debugging on as it's a production server - I don't have the data on my test machine to use, and the amount of data is huge to download As I said - it's confusing the hell out of me. Philip Arnold Also you chould RUN SQLtrace to see whats going on. These kind of issues Usually are a result of silly mistakes. I know mind are. Get someone else there to look at the code, might pick it up staight away. Justin MacCarthy ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Query confusion - CF not recognising query name
Phillip, A couple of suggestions. I use debugging on a production servers all the time. If you have access to the CF Admin, I turn on debugging for my IP address. Since I'm on dial-up and my ISP drops my connection all the time. I have to change IP addresses that the debug shows on about every half hour. While I'm debugging. When I don't have the luxury of turning on debug. I use this to see what is being passed. cfif #cgi.Remote_addr# is "123.456.789.123" cfoutput Whatever variables I'm looking to trace. #PreserveSingleQuotes(variables.whereList)# #variables.peopletable# #variables.idlist# #form.orderby# /cfoutput /cfif I did run your query against one of my usertables and it ran fine without the wherelist and got the idcount to showup I'm guessing you have some record(s) with special characters that are causing the problem. Just try to get one record to work see if the problem is in the code or a record issue. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
Why not put debugging on for your IP only??? D'OH - forgot you could do that... Also you chould RUN SQLtrace to see whats going on. These kind of issues Usually are a result of silly mistakes. I know mind are. Get someone else there to look at the code, might pick it up staight away. 2 of us spent 45 minutes looking at it before I hit CF-Talk... Here's the bigger confusion - I've changed nothing on the code and it's now started working... I haven't even upload another version of the template since I sent the first message - the CFServer service has been Stop/Started several times since, but also many times during the problem Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
A couple of suggestions. I use debugging on a production servers all the time. If you have access to the CF Admin, I turn on debugging for my IP address. Since I'm on dial-up and my ISP drops my connection all the time. I have to change IP addresses that the debug shows on about every half hour. While I'm debugging. I have a fixed IP, so I've now got debugging permanently on form me only When I don't have the luxury of turning on debug. I use this to see what is being passed. cfif #cgi.Remote_addr# is "123.456.789.123" cfoutput Whatever variables I'm looking to trace. #PreserveSingleQuotes(variables.whereList)# #variables.peopletable# #variables.idlist# #form.orderby# /cfoutput /cfif I checked all of these when I was having the problem - I just couldn't talk to the query although the SQL was running I did run your query against one of my usertables and it ran fine without the wherelist and got the idcount to showup I'm guessing you have some record(s) with special characters that are causing the problem. In that table there's only a few fields - most of which are INT, but since it's working again, I can't trace the problem again Just try to get one record to work see if the problem is in the code or a record issue. I tried that - it just wouldn't talk to the query Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Query confusion - CF not recognising query name
here's a real silly question but is cfset variables.IDCount=getPeopleInfo.RecordCount written exactly like this or is it written like cfset variables.IDCount=#getPeopleInfo.RecordCount# leaving the # off could be your problem. cheers, nelson Original Message Follows From: "Philip Arnold - ASP" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Query confusion - CF not recognising query name Date: Mon, 08 Jan 2001 18:49:07 - Received: from [207.31.122.140] by hotmail.com (3.2) with ESMTP id MHotMailBC235737002ED82197E8CF1F7A8C1FA567; Mon Jan 08 11:06:20 2001 Received: from houseoffusion.com ([207.31.122.140]) by www.houseoffusion.com (Post.Office MTA v3.5.3 release 223 ID# 0-54969U100L100S0V35) with ESMTP id com for [EMAIL PROTECTED]; Mon, 8 Jan 2001 14:04:13 -0500 From [EMAIL PROTECTED] Mon Jan 08 11:07:45 2001 Message-id: [EMAIL PROTECTED] I've got some code running which SHOULD work, but isn't, and is confusing the hell out of me Here's the code; cfquery name="getPeopleInfo" datasource="People" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) and #PreserveSingleQuotes(variables.whereList)# order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount Here's the error; An error occurred while evaluating the expression: variables.IDCount=getPeopleInfo.RecordCount Error near line 527, column 8. Error resolving parameter GETPEOPLEINFO.RECORDCOUNT ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: You have misspelled the parameter name, or You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag. I've tried putting a CFLoop straight after the query and it comes back that the query doesn't exist - but I know it does (obviously) It's running on CFPro4.5.1 SP2 on NT (Dual PIII 733, 512Mb RAM) Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
Actually, that's not right. Either one will work. I prefer cfset variables.IDCount=getPeopleInfo.RecordCount myself. Have you run the query in a query analyzer? If so, does it return results? Also, are you catching a database error and not returning anything to the client? Russel Madere, Jr. Senior Web Developer ICQ: 5446158 http://www.TurboSquid.com Some days you eat the bear; some days the bear eats you. -Original Message- From: t nelson [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 13:17 To: CF-Talk Subject: Re: Query confusion - CF not recognising query name here's a real silly question but is cfset variables.IDCount=getPeopleInfo.RecordCount written exactly like this or is it written like cfset variables.IDCount=#getPeopleInfo.RecordCount# leaving the # off could be your problem. cheers, nelson Original Message Follows From: "Philip Arnold - ASP" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Query confusion - CF not recognising query name Date: Mon, 08 Jan 2001 18:49:07 - Received: from [207.31.122.140] by hotmail.com (3.2) with ESMTP id MHotMailBC235737002ED82197E8CF1F7A8C1FA567; Mon Jan 08 11:06:20 2001 Received: from houseoffusion.com ([207.31.122.140]) by www.houseoffusion.com (Post.Office MTA v3.5.3 release 223 ID# 0-54969U100L100S0V35) with ESMTP id com for [EMAIL PROTECTED]; Mon, 8 Jan 2001 14:04:13 -0500 From [EMAIL PROTECTED] Mon Jan 08 11:07:45 2001 Message-id: [EMAIL PROTECTED] I've got some code running which SHOULD work, but isn't, and is confusing the hell out of me Here's the code; cfquery name="getPeopleInfo" datasource="People" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) and #PreserveSingleQuotes(variables.whereList)# order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount Here's the error; An error occurred while evaluating the expression: variables.IDCount=getPeopleInfo.RecordCount Error near line 527, column 8. Error resolving parameter GETPEOPLEINFO.RECORDCOUNT ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: You have misspelled the parameter name, or You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag. I've tried putting a CFLoop straight after the query and it comes back that the query doesn't exist - but I know it does (obviously) It's running on CFPro4.5.1 SP2 on NT (Dual PIII 733, 512Mb RAM) Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
It looks like your code has been greatly excerpted. There is no chance that you are setting the variable getPeopleInfo equal to some simple value and overwriting the query somewhere between the query and the loop? Is the name of the query dynamic? Sorry for the questions, but it seems very unlikely that ColdFusion would behave this way. Any additional information would be useful. Benjamin S. Rogers Web Developer, c4.net voice: (508) 240-0051 fax: (508) 240-0057 -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 1:49 PM To: CF-Talk Subject: Query confusion - CF not recognising query name I've got some code running which SHOULD work, but isn't, and is confusing the hell out of me Here's the code; cfquery name="getPeopleInfo" datasource="People" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) and #PreserveSingleQuotes(variables.whereList)# order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount Here's the error; An error occurred while evaluating the expression: variables.IDCount=getPeopleInfo.RecordCount Error near line 527, column 8. Error resolving parameter GETPEOPLEINFO.RECORDCOUNT ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: You have misspelled the parameter name, or You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag. I've tried putting a CFLoop straight after the query and it comes back that the query doesn't exist - but I know it does (obviously) It's running on CFPro4.5.1 SP2 on NT (Dual PIII 733, 512Mb RAM) Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Query confusion - CF not recognising query name
I just took out the and #PreserveSingleQuotes(variables.whereList)# --- set some variables and it worked fine for me. What's in the wherelist?? It ran fine for me. cf 4.01 on Windows 2000 server. Jeff Craig cfset variables.peopletable = "users" cfset variables.idlist = "1,2,3,4,5,6" cfset form.orderby = "email" cfquery name="getPeopleInfo" datasource="voluma" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount cfoutput#variables.idcount#/cfoutput ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
What about removing the "variables." scope? John McKown, VP Business Services Delaware.Net, Inc. 30 Old Rudnick Lane, Suite 200 Dover, DE 19901 email: [EMAIL PROTECTED] phone: 302-736-5515 fax: 302-736-5945 icq: 1495432 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 3:02 PM To: CF-Talk Subject: Re: Query confusion - CF not recognising query name I just took out the and #PreserveSingleQuotes(variables.whereList)# --- set some variables and it worked fine for me. What's in the wherelist?? It ran fine for me. cf 4.01 on Windows 2000 server. Jeff Craig cfset variables.peopletable = "users" cfset variables.idlist = "1,2,3,4,5,6" cfset form.orderby = "email" cfquery name="getPeopleInfo" datasource="voluma" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount cfoutput#variables.idcount#/cfoutput ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query confusion - CF not recognising query name
Are you talking to SQL Server? I don't think it likes the table name "Users" Try putting square brackets around the table name, eg. "[Users]" and see if that helps. AND run it with debugging on to show the SQL and the result. This will let you know whether the SQL is actually being executed and how many rows it returns. -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 10:49 AM To: CF-Talk Subject: Query confusion - CF not recognising query name I've got some code running which SHOULD work, but isn't, and is confusing the hell out of me Here's the code; cfquery name="getPeopleInfo" datasource="People" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) and #PreserveSingleQuotes(variables.whereList)# order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount Here's the error; An error occurred while evaluating the expression: variables.IDCount=getPeopleInfo.RecordCount Error near line 527, column 8. Error resolving parameter GETPEOPLEINFO.RECORDCOUNT ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: You have misspelled the parameter name, or You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag. I've tried putting a CFLoop straight after the query and it comes back that the query doesn't exist - but I know it does (obviously) It's running on CFPro4.5.1 SP2 on NT (Dual PIII 733, 512Mb RAM) Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists