[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Bind expressions cannot be empty.(coldfusion)

Posted on 2009-05-12
2
Medium Priority
?
784 Views
Last Modified: 2013-12-20
Hello experts.
I have a query:
<cfquery name="getmodell" datasource="#request.dsn#">
SELECT Modell
From Artikel
WHERE Mobile_Sub_ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#Url.Mobile_Sub_ID#">
Order by Modell ASC
</cfquery>
<cfset modellist= valuelist(getmodell.Modell,',')>

And a cfinput:
<cfinput  type="text" name="S_Modell" Autosuggest="#modellist#" />

If i don't have any records (recordcount = 0) i have the error Bind expressions cannot be empty.
Any help to solve the problem?
0
Comment
Question by:Panos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
azadisaryev earned 2000 total points
ID: 24373697
wrap your <cfinput> in a <cfif> block checking for listlen(modellist), and if list is empty, show a plain text input box (without autosuggest):

<cfif listlen(modellist)>
  <cfinput  type="text" name="S_Modell" Autosuggest="#modellist#" />
<cfelse>
  <cfinput  type="text" name="S_Modell" />
</cfif>

Azadi
0
 
LVL 2

Author Closing Comment

by:Panos
ID: 31580861
Thank you azadi fr yur help
regards
panos
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

650 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