• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

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

Hi,

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#">
         .......
</cfquery>

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.
0
kalua
Asked:
kalua
  • 2
  • 2
2 Solutions
 
pinaldaveCommented:
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 : http://www.communitymx.com/content/article.cfm?cid=CA74F
2) than you use the name of the datasouce directly like datasource="sms_connect"

Regards,
---Pinal
0
 
kaluaAuthor Commented:
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.
0
 
mrichmonCommented:
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
0
 
kaluaAuthor Commented:
OK, thanx mrichmon.. Too bad.. have to ask the administrator then.
0
 
pinaldaveCommented:
I just reached office and see this thread.
Just confirming what mrichman said... CF 6 does not support dns less datasource.
Regards,
---Pinal
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now