Spencer, You're right. The issue looks to be that sAllParams is empty. Change the if to:
<cfif bAddCriteria AND len(trim(sAllParams))> That might do the trick. Dave -----Original Message----- From: Spencer Liddle [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2008 6:14 PM To: CF-Newbie Subject: Re: Element ... is undefined in a Java object of type class coldfusion.filter.FormScope... Dave, Thanks for the help. :) I have no clue why the Group is there. This was originally done by a guy named Ian about 4 years ago. I just saw it for the first time yesterday. You should have seen some of the other stuff he did... :-/ I removed the group and it didn't effect the error at all. I think that it is stemming from the <cfif bAddCriteria> coming before the WHERE Clause. Here is the SQL from the error. I am going to keep fussing with it. Let me know if you see the culprit. Thanks, Spencer Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near 'WHERE'. The error occurred in F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 647 Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 647 Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 645 : ) 646 : </cfif> 647 : </cfif> 648 : 649 : </cfquery> ---------------------------------------------------------------------------- ---- SQL SELECT tblCompanies.ID, dbo.GetCompanyName(tblCompanies.ID) AS Name, tblCompanies.IsDealer, tblCompanies.WasDealer, tblCompanies.Discount, tblCompanies.IsRecertified FROM tblCompanies LEFT JOIN tblPeople AS Contacts ON tblCompanies.ID = Contacts.CompanyID WHERE DATASOURCE McCauleyDB VENDORERRORCODE 102 SQLSTATE HY000 ---- >Spencer, > >I can't seem to figure out why you have the GROUP BY there? What's your >purpose in that? I reformatted the query so it was easier to read (you >should probably do that before you post them if at all possible). GROUP BY >is usually used to accomplish getting some aggregate function (like count() >or sum() or avg() or something like that) and that's not in your select. In >fact, I don't think I've ever used a group by where every column specified >in the select clause was also specified in the GROUP BY clause, so I'm not >even sure if that's possible. > >I would try taking off your GROUP BY statement and see if it works, however, >I don't know if that will break something else in your app also. > >If you still can't figure it out, please post the SQL that appears in the >error message, NOT the sql from your CF code. This will have all the CF >variables evaluated so we can see what's actually being sent to the DB >server. The code below doesn't show us that, it only shows what you have in >your .CFM file, but that's not what's getting sent to the DB server because >you have dynamic SQL. > >Dave ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3996 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
