change in cfquery with coldfusion mx 7: parameter 'connectstring' gone...

Posted on 2005-04-25
Last Modified: 2013-12-24

Recently the Coldfusion version on our server upgraded from version 5 to MX 7.
Since then the following code didn't work anymore:

<cfset sms_connect="Driver={Microsoft Access Driver (*.mdb)};Dbq=#ExpandPath('..\..\Db\Yp_SMS.mdb')#;Uid=admin;Pwd=pass;">

<CFQUERY NAME="smsRetrieve" DBTYPE="dynamic" connectstring="#sms_connect#">

I found out that the 'connectstring' parameter no longer exists, so I tried to change it into 'datasource':

<CFQUERY NAME="smsRetrieve" DBTYPE="dynamic" datasource="#sms_connect#">

But this doesn't work...

Does anyone now how to change the CFQUERY to make it work again?

Thank you.
Question by:kalua
    LVL 22

    Assisted Solution

    1) you need to set your database path in the ColdFusion administrator not in the CF page.
    go to Coldfusion adminstrator and go to data source here you set the path, select driver, username and passowrd  
    link :
    2) than you use the name of the datasouce directly like datasource="sms_connect"


    Author Comment

    Thank you for your answer, pinaldave, but I should have added that it needs to be a DNS-less connection. I do not have access to the Coldfusion server and that's why I used the 'connectstring' parameter. This worked perfectly with Coldfusion 5. But it seems that the newer Coldfusion versions (MX 6/7) do not support these types of connections anymore.
    So still looking for a solution or work-around.
    LVL 35

    Accepted Solution

    Cold Fusion MX (versions 6 and up) do not support DNS-less connections anymore.

    You will have to add the connection in the CFAdmin.  If you do not have access talk to the people that do (your IT dept, your provider, etc) as they usually provide an interface for adding the Datasources.

    Otherwise you will need to stay with CF 5 or earlier

    Author Comment

    OK, thanx mrichmon.. Too bad.. have to ask the administrator then.
    LVL 22

    Expert Comment

    I just reached office and see this thread.
    Just confirming what mrichman said... CF 6 does not support dns less datasource.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    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…
    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
    The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now