<cfoutput>#title#</cfoutput> select * from userid where uid='#session.uid#' select uid from userid where userid='#url.lnid#' and uid='#session.uid#' select c.CDSDataItemShort from AgencyCDSDataItem a join CDSDataItem c on a.CDSDataItemId = c.CDSDataItemId join SiteMaster s on s.AgencyNum = a.AgencyNum where s.SiteNum = #url.s# #reqlist# [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => galmy [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Data source could not be found - Coldfusion Database Access

Data source could not be found - Coldfusion Database Access

I have ColdFusion MX7 running on one server. I have SQL Server 2000 running on another server on the same local area network. In the ColdFusion Administrator, I created a datasource. I put in the correct database name, server name (Colw2ksql2), port number, user id and password. In the Administrator, the datasource checks out OK. Then I added this line to Application.cfm: <cfset application.datasourceextranet = "Colw2ksql2"> Then I added a query to a ColdFusion template: <cfquery dataset="#application.datasourceextranet#" name="myQuery"> select etc.... </cfquery> When I run the page, I get: Error Occurred While Processing Request Data source COLW2KSQL2 could not be found. ...

  1. #1

    Default Data source could not be found

    I have ColdFusion MX7 running on one server. I have SQL Server 2000 running on
    another server on the same local area network. In the ColdFusion Administrator,
    I created a datasource. I put in the correct database name, server name
    (Colw2ksql2), port number, user id and password. In the Administrator, the
    datasource checks out OK.

    Then I added this line to Application.cfm:

    <cfset application.datasourceextranet = "Colw2ksql2">

    Then I added a query to a ColdFusion template:

    <cfquery dataset="#application.datasourceextranet#" name="myQuery">
    select etc....
    </cfquery>

    When I run the page, I get:

    Error Occurred While Processing Request
    Data source COLW2KSQL2 could not be found.

    What am I missing here?

    galmy Guest

  2. #2

    Default Re: Data source could not be found

    You are leaving something out.
    For example, dataset="#application.datasourceextranet#" is not
    valid syntax and should have given a different error.

    Anyway, "Colw2ksql2" is your server name. Is that the same name you gave the
    datasource in the CF administrator?

    Cfquery takes the datasource name, not the server name.


    MikerRoo Guest

  3. #3

    Default Re: Data source could not be found

    Sorry, I should have made that clear. Yes, Colw2ksql2 is the datasource name,
    as well as the server name. But just to be sure, I changed the datasource name
    to Extranet, but it made no difference. Also, "dataset" was a misprint in my
    original post - the source code actually says "datasource."

    galmy Guest

  4. #4

    Default Re: Data source could not be found

    Well if the datasource name is correct and the datasource STILL validates in
    the Coldfusion Administrator, then it is likely that there is something else
    wrong with the code (error messages can be misleading).

    It is also possible that your firewall(s) are blocking full access to the DB.
    Try turning them off.

    Also consider posting full, unedited error messages and unedited code. It
    speeds up the problem solving process.


    MikerRoo Guest

  5. #5

    Default Re: Data source could not be found

    Okay, here's the entire error message (note: I changed the datasource name from
    Colw2ksql2 to Extranet; everything else remains the same) :
    ****
    Data source Extranet could not be found.

    The error occurred in C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm:
    line 72
    Called from C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm: line 9
    Called from C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm: line 1
    Called from C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm: line 72
    Called from C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm: line 9
    Called from C:\Inetpub\CFHCWeb\msibeta2\onlinefper\newvisit2.c fm: line 1

    70 : </cfif>
    71 :
    72 : <cfquery datasource="Extranet" name="getReqItems">
    73 : select c.CDSDataItemShort from AgencyCDSDataItem a join CDSDataItem c
    on a.CDSDataItemId = c.CDSDataItemId
    74 : join SiteMaster s on s.AgencyNum = a.AgencyNum where s.SiteNum =
    #url.s#


    --------------------------------------------------------------------------------

    DATASOURCE Extranet

    Please try the following:
    Check the ColdFusion doentation to verify that you are using the correct
    syntax.
    Search the Knowledge Base to find a solution to your problem.

    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
    1.1.4322; .NET CLR 2.0.50727)
    Remote Address 63.149.243.106
    Referrer
    http://65.120.32.233/msibeta2/onlinefper/OnlineFPERselect.cfm?patientNum=1&lnid=
    CFHCAdmin&sites=84
    Date/Time 12-Feb-07 08:26 AM

    Stack Trace (click to expand)
    at
    cfnewvisit22ecfm900779873._factor17(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:72) at
    cfnewvisit22ecfm900779873._factor21(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:9) at
    cfnewvisit22ecfm900779873.runPage(C:\Inetpub\CFHCW eb\msibeta2\onlinefper\newvisi
    t2.cfm:1) at
    cfnewvisit22ecfm900779873._factor17(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:72) at
    cfnewvisit22ecfm900779873._factor21(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:9) at
    cfnewvisit22ecfm900779873.runPage(C:\Inetpub\CFHCW eb\msibeta2\onlinefper\newvisi
    t2.cfm:1)

    java.sql.SQLException: Data source "Extranet" not found.
    at coldfusion.sql.DataSrcImpl.validate(DataSrcImpl.ja va:90)
    at coldfusion.sql.SqlImpl.validate(SqlImpl.java:203)
    at coldfusion.tagext.sql.QueryTag.doStartTag(QueryTag .java:443)
    at
    cfnewvisit22ecfm900779873._factor17(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:72)
    at
    cfnewvisit22ecfm900779873._factor21(C:\Inetpub\CFH CWeb\msibeta2\onlinefper\newvi
    sit2.cfm:9)
    at
    cfnewvisit22ecfm900779873.runPage(C:\Inetpub\CFHCW eb\msibeta2\onlinefper\newvisi
    t2.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343)
    at coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:65)
    at coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:210)
    at coldfusion.filter.RequestMonitorFilter.invoke(Requ estMonitorFilter.java:51)
    at coldfusion.filter.PathFilter.invoke(PathFilter.jav a:86)
    at coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:27)
    at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50)
    at
    coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
    er.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:105)
    at coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257)
    at jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
    ****
    Here's the Application.cfm:
    ****
    <CFAPPLICATION NAME="Name"
    CLIENTMANAGEMENT="Yes"
    SESSIONMANAGEMENT="Yes"
    SESSIONTIMEOUT=#CreateTimeSpan(1, 0, 0, 0)#>

    <cfset application.datasource = "totalmillion">
    <cfset application.datasourceregion1 = "totalmillion">
    <cfset application.path = "C:\Inetpub\CFHCWeb\msidevwayne">
    <cfset application.webpath = "C:\Inetpub\CFHCWeb\msibeta2\">
    <cfset application.tempdatasourceText = "tempProcessText">
    <cfset application.tempdatasourceExcel = "tempProcescel">
    <cfset application.tempdatasourceAccess = "tempProcessAccess">
    <cfset application.tempdatasourceDoc = "tempProcessDoc">
    <cfset application.auditpurge = "totalmillion">
    <cfset hardcodedpath = "C:\Inetpub\CFHCWeb\retrievenonstdrep\">
    <cfset application.reportsitepath = "/reportserver/">
    <cfset application.livesitepath = "/msibeta2/">
    <cfset application.bowlinkpath = "C:\Inetpub\CFHCWeb\Bowlink\">
    <cfset application.datasourceextranet = "Extranet">
    ****
    I can't include the entire template, because it's too long. Here's more than
    enough to give the needed context:
    ****


    <!---this is the form for users to enter in a new visit for an established
    patient, it displays the form
    with the site and patient number (instead of having those as input boxes--->

    <CFHEADER Name="Expires" Value="#Now()#">
    <CFHEADER NAME="pragma" VALUE="no-cache">

    <cfif (not isdefined("session.userid")) or (not
    isdefined("session.permission"))>
    <cflocation url="../expire.cfm" addtoken="no">
    <cfelse>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <STYLE TYPE="text/css">
    .leftbar { color: #000084;
    font-family: "arial", "helvetica";
    font-size: 10pt;
    }
    .leftbar A:hover { color: #000000;}
    .leftbar A {text-decoration: none; color: #000084;}
    </STYLE>

    <html>
    <script Language="JavaScript">

    function winOpenFAQ(urlLoc, WinName)
    {
    theWindow =
    window.open(urlLoc,WinName,"WIDTH=600,HEIGHT=400,L EFT=200,TOP=200,,alwaysRaised=
    yes,status=no,toolbar=no,directories=no,menubar=no ,location=no,scrollbars=yes,re
    sizable=yes");
    }

    </script>

    <script Language="JavaScript">
    function confirmCancel()
    {
    if(confirm("Any data you have entered will not be saved. Do you still want
    to cancel?"))
    {
    <cfoutput>
    location='OnlineFPERselect.cfm?lnid=#url.lnid#';
    </cfoutput>
    }
    }
    </script>

    <head>
    <a name="top"></a>
    <cfset title = "Post Online CVR - Site #url.s#">

    <title><cfoutput>#title#</cfoutput></title>

    <cfinclude template="../style.cfm">
    </head>

    <cfif url.pt is "n">
    <body onLoad="doent.frm.dob.focus();doent.frm.dob. select();">
    <cfelse>
    <body
    onLoad="doent.frm.visitdate.focus();doent.fr m.visitdate.select();">
    </cfif>

    <cfquery datasource="#application.datasourceregion1#" name="findname1">
    select * from userid where uid='#session.uid#'
    </cfquery>

    <cfset thedate = createodbcdate(now())>

    <cfquery datasource="#application.datasourceregion1#" name="getaccesshere">
    select uid from userid where userid='#url.lnid#' and uid='#session.uid#'
    </cfquery>

    <cfif getaccesshere.recordcount is 0>
    <cflocation url="denied.cfm" addtoken="no">
    </cfif>

    <cfquery datasource="Extranet" name="getReqItems">
    select c.CDSDataItemShort
    from AgencyCDSDataItem a
    join CDSDataItem c on a.CDSDataItemId = c.CDSDataItemId
    join SiteMaster s on s.AgencyNum = a.AgencyNum
    where s.SiteNum = #url.s#
    </cfquery>

    <cfset reqlist = "">
    <cfloop query="getReqItems">
    <cfset newreq = #int(trim(cdsdataitemshort))#>
    <cfset reqlist = listappend(reqlist, "'#newreq#'", ",")>
    </cfloop>

    <cfoutput>#reqlist#</cfoutput>

    galmy Guest

  6. #6

    Default Re: Data source could not be found

    OK, it still looks like a connection / firewall problem.

    So:
    (1) Does "Extranet" still verify from within the CF administrator?
    (2) Did you fully disable all firewalls -- especially the windows firewall?
    You'll reanable these once the problem is fixed (and port permissions adjusted).
    (3) What is the exact type of the "Extranet" data source -- especially ODBC
    versus JDBC?
    (4) From the machine that is running CF, can you connect to the "Colw2ksql2"
    or "Extranet" database using query yzer?


    MikerRoo Guest

  7. #7

    Default Re: Data source could not be found

    (1) Does "Extranet" still verify from within the CF administrator?

    Yes.

    (2) Did you fully disable all firewalls -- especially the windows firewall?
    You'll reanable these once the problem is fixed (and port permissions adjusted).

    I can't do that on my own authority - I'll have to coordinate with the network
    admin.

    (3) What is the exact type of the "Extranet" data source -- especially ODBC
    versus JDBC?

    SQL Server 2000

    (4) From the machine that is running CF, can you connect to the "Colw2ksql2"
    or "Extranet" database using query yzer?

    Yes.

    galmy Guest

Similar Threads

  1. Data Source Not Found Error
    By CapBrose in forum Coldfusion Server Administration
    Replies: 1
    Last Post: July 6th, 07:20 PM
  2. data source could not be found error
    By Jannette T in forum Coldfusion Database Access
    Replies: 7
    Last Post: November 29th, 05:31 PM
  3. Data Source Not Found
    By SpunkyVulcan in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: April 15th, 05:20 AM
  4. Data Source Not Found... on some machines
    By KomputerMan.com in forum Coldfusion Database Access
    Replies: 1
    Last Post: March 18th, 06:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •