Probably you will have to trim them first, because an empty space will go through: <cfif Len (trim (instructorid)) AND Len(trim (lastname)) ...>
Add data to the db <cfelse> Build a query in cf memory of bad data </cfif> Marius Milosav ScorpioSoft Corp. www.scorpiosoft.com -----Original Message----- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: July 19, 2007 12:58 PM To: CF-Talk Subject: How do I properly check for an empty string? I'm tryin to check and see if some fields have any data in a spreadsheet, using Ben's POI utility. <cfif Len(instructorid) AND Len(lastname) AND Len(firstname) AND Len(URL.EID)> Add data to the db <cfelse> Build a query in cf memory of bad data </cfif> The problem is, empty strings are slippin thru and I end up with rows of empty strings. Then my process bombs out because it tries looping over these empty string columns and can't find an index. How can I either make sure no empty strings build rows, or either delete rows from my query in memory where all columns are empty strings? Hope this makes sense. :) Thanks, Will ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284098 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4