1 Reply Latest reply on Jun 29, 2015 6:03 PM by charlie@carehart.org

    How to autocomplete names in ColdFusion builder 3?

    rudiv51503245 Level 1

      Hi everyone,


      I am very very new to ColdFusion. Currently I am using another text editor that I have been using for everything else and also works beautifully for ColdFusion Development, except it lacks the connected database fields auto completion. During my training I saw the trainer auto completing the database fields when making a query. The instructor was using ColdFusion Builder 2. I downloaded ColdFusion Builder 3, did a test query and my database is connected, but no auto completing of the database fields.


      Any ideas why?


      Thank you in advance.

        • 1. Re: How to autocomplete names in ColdFusion builder 3?
          charlie@carehart.org Adobe Community Professional & MVP

          Rudi, there can be several reasons why it does not work, and there are indeed solutions, if you can be patient to address them all.


          Not likely the reason:


          FWIW, some may want to point out that some auto-complete features in CFB only happen when you use alt-space. The SQL popups should not require that, though, if all else is configured right (more on that in a moment). And some may assert that you need to open the “sql editor” to see SQL completion, but it should work just fine while coding and within the normal CFML code editor within CFB, so that’s not why it’s not working for you.


          The likely reason, in summary:


          The far more important problem is that you must have a correctly configured connection within CFB between it and whatever CF server has the datasource whose columns you want to see. It doesn’t happen otherwise: CFB needs to ask the CF server what databases are on the server, what tables are in those databases, and what columns are in those tables, in order for it to show them to you while you are typing. And only if you have that configuration implemented and working and correctly can CFB show you that database metadata.


          It does definitely work when you get it right. I have just confirmed it on my own CFB implementation as I type this.


          Getting things working:


          It’s just that this connection between CFB and your server involves several moving parts: you have to have a server connection defined (in the Window>Show View>CF Servers), that server has to have an RDS connection defined (and your server needs to allow for RDS to be used, which would not be so for most production servers, and should not be so without considerable security precautions). But maybe you’re connecting CFB to your local development edition of CF installed on the same machine as CFB. Even so, you DO need an RDS connection from CDB to that local CF, for CFB to ask it for that database metadata, to do the auto-completion for you. And if you ARE trying to connect to a server rather than your own development machine, you may find even with that all configured “right”, you may have a firewall configuration or other security restriction that blocks the RDS communication from happening.


          Finally, you need to define a “project” in CFB, and you need to connect that project to your server (defined above), using the project’s properties>ColdFusion Server Settings. And as important, you must then open the CFM file in question from within such a project, for it to use features like this which only work when a file is opened within a project. (Some people try to open their files from the file system, directly into CFB, which is supported. But then that is NOT going to open it as a “project”, even if that folder is defined in a project. You have to open the file from within CFB using the Navigator, or again such cool features as SQL auto-completion don’t work.)


          Only if all that is configured right will you be able to see the column names popup as you type. I know it can be frustrating. Someone may say, “my non-CF IDE xyz doesn’t require that”, but I would just point out that since CFB is a desktop tool, and CF is a web application server, there is a LOT more that has to be communicated between CFB and the CF server—and since that CF server may or may not be on the same box as CFB, it’s simply necessary that all this communication happen between CFB and the server. And if it’s not properly configured, if at all, then as you experienced, some features in CFB simply “don’t work at all”. 


          Where to learn more/get help:


          BTW, all the above is discussed in the CFBuilder documentation. There are chapters on setting up servers, connecting to them, setting up RDS, setting up projects, connecting them to a server, and even using the SQL auto-complete features, and 160 pages of other useful info that every CFB user really would do well to read (at least some of it, of not all of it).


          There are also CF blog entries that have covered parts of the above, such as connecting to a remote server, as discussed at http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-builder-3-with-a-remote-server.


          I have also done various presentations on CFBuilder, including hidden gems talks on CFB 2 and 3, where I discussed some of this, as well as talks on using the step debugging features in CFB, which also rely on this sort of propery underlying project-server-RDS connection from within CFB. See the presentations page at carehart.org, and search for just the word builder.


          Finally, and though I may sound like a broken record after a similar response in these forums last week, if you have difficulty getting these things all working, you can turn to folks like myself who can offer to help you get this all configured on your machine, via remote consulting. It’s not free (sorry), but all the pointers above are. If you can’t get it working, and you really want to, I’m just saying you CAN get it configured with guidance from a more experienced person who understands the ins and outs. If you may be interested in that, see more on my approach, rates, and satisfaction guarantee in the consulting page at carehart.org.



          Let us know how you get on.