Looks like CF is flagging the wrong line as being in error. Try adding a <cfabort> immediately after the </cfquery> . You'll probably still get the error, suggesting that it's actually the query or (more likely) the database that's wrong.
---- Matthew Walker, ESWsoftware http://www.eswsoftware.com > -----Original Message----- > From: Donna French [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 17 November 2004 12:00 p.m. > To: CF-Talk > Subject: Help! Error on ValueList > > Okay, I'm trying to run this code local (CFMX & Access) and > keep getting an error. > > Code: > > <!--- CONFIGURATION ---> > > <!--- Change these to suit your server ---> <cfset dsn = > "lanes"> <cfset imagesDirectory = "c:\Documents and > Settings\Lanes\My Documents\Web-Images\85"> <cfset > imagesSubdirectories = "400,200,85"> > <!--- SQL Server is not case-sensitive, so lanesid = lanesID > ---> <cfset imageColumnName = "lanesid"> > <!--- Change this to FALSE to really do the deletes... ---> > <cfset testMode = true /> > > <!--- /CONFIGURATION ---> > > > <!--- Get all of the filenames ---> > <cfquery datasource="#dsn#" name="qGetFilenames"> > SELECT #imageColumnName# FROM products > UNION > SELECT #imageColumnName# FROM dolls > </cfquery> > > <!--- Turn the filenames into a list ---> <cfset fileNames = > #ValueList(qGetFilesnames.imageColumnName)# /> > > <!--- > Loop through the various image subdirectories doing cleanup > ---> > <cfloop list="#imagesSubdirectories#" index="i"> > <cfdirectory action="list" directory="#imagesDirectory#\#i#" > name="qDirectory"> > > <!--- > Loop over the files in the directory, deleting any that isn't > in the list of existing files > ---> > <cfoutput> > <cfloop query="qDirectory"> > <cfif not listFind(fileNames, qDirectory.name)> > <cfif not testMode> > <cffile action="delete" > file="#imagesDirectory#\#i#\#qDirectory.name#"> > <cfelse> > Test Mode: #imagesDirectory#\#i#\#qDirectory.name# > would be deleted. <br /> > </cfif> > </cfif> > </cfloop> > </cfoutput> > </cfloop> > > > Error: > Error Executing Database Query. > [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC > Microsoft Access Driver] The Microsoft Jet database engine > cannot find the input table or query 'products'. Make sure it > exists and that its name is spelled correctly. > > The Error Occurred in C:\Documents and Settings\Lanes\My > Documents\Web\imagesCleanup.cfm: line 29 > > 27 : </cfquery> > 28 : > 29 : <!--- Turn the filenames into a list ---> 30 : <cfset > fileNames = #ValueList(qGetFilesnames.imageColumnName)# /> > 31 : > > > ANY help greatly appreciated. A guy on this list helped with > this a while back and I've never sat down and really tried to > get it working. > > TIA, > Donna > -- > ------------------------ > Donna French > [EMAIL PROTECTED] > > Blog: http://dgfrench.blogspot.com > Site: http://www.dgfrenchdesigns.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184497 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

