Data Source OK but code can't find it

Discussion in 'Programming' started by adamglass, Aug 11, 2009.

  1. #1
    I am migrating a multiple-instance site from CF 6 to CF 8. Both versions run under Windows Server 2003. The first instance has been set up on the new server and it runs fine, using a Microsoft Access file as its data source. Now I am doing the same thing for the second instance but have run into an odd problem:

    This instance uses a different Microsoft Access file for its data source. It was added successfully in the CF administrator and checks out as OK. But when the instance's CF code is run, it gives this error:

    Datasource irms_prd could not be found.
    The error occurred in E:\www\irms\html\VideosIRMS.cfm: line 12
    10 : </CFIF>
    11 :
    12 : <CFQUERY NAME="GetSubjects" DATASOURCE="#REQUEST.dsn#">
    13 : SELECT subject_code,
    14 : subject_description

    The data source name above, irms_prd, is the same in the CF administrator. I've looked through log files and poked through everything I can think of but cannot figure out what's going on. Can anyone help?

    Thank you!
    Adam Glass
     
    adamglass, Aug 11, 2009 IP
  2. Paul_K

    Paul_K Greenhorn

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Are you 100% sure its in the request scope? Did you move across your App.cfm?
     
    Paul_K, Aug 18, 2009 IP
  3. fusionwebdev

    fusionwebdev Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would statically put the datasource in there , Request isnt very safe

    try that first
     
    fusionwebdev, Aug 24, 2009 IP
  4. FCM

    FCM Well-Known Member

    Messages:
    669
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    155
    #4
    I would change "request" to "application" and store your dsn information in your Application.cfc file.
     
    FCM, Aug 25, 2009 IP