SQL database connection problem with dbtype="ODBC"

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default SQL database connection problem with dbtype="ODBC"

    I am having one website in coldfusion. But not able to connect database with
    application. I am getting following error.

    I created Database in MS-SQL and try to connect from Coldfusion admin manager
    ->Data & Services > Datasources and uses driver as "ODBC socket"

    Pls help me to solve error

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


    The error occurred in D:\Website\matchtek\sample\docs\dsp_nav_main.cfm: line 4
    Called from D:\Website\matchtek\sample\docs\bodycontent.cfm: line 45
    Called from D:\Website\matchtek\sample\docs\index.cfm: line 32
    Called from D:\Website\matchtek\sample\docs\dsp_nav_main.cfm: line 4
    Called from D:\Website\matchtek\sample\docs\bodycontent.cfm: line 45
    Called from D:\Website\matchtek\sample\docs\index.cfm: line 32

    2 : <cfparam name="URL.subsection" default="">
    3 :
    4 : <cfquery name="getPublicNav" datasource="#request.ds#" dbtype="odbc">
    5 : SELECT
    6 : *



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

    DATASOURCE sample

    Please try the following:
    Check the ColdFusion documentation 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.0; .NET CLR
    1.1.4322)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 25-Feb-05 08:30 AM

    Stack Trace (click to expand)
    at
    cfdsp_nav_main2ecfm1837868689.runPage(D:\Website\m atchtek\sample\docs\dsp_nav_ma
    in.cfm:4) at
    cfbodycontent2ecfm1488737299.runPage(D:\Website\ma tchtek\sample\docs\bodycontent
    ..cfm:45) at
    cfindex2ecfm1521178899.runPage(D:\Website\matchtek \sample\docs\index.cfm:32) at
    cfdsp_nav_main2ecfm1837868689.runPage(D:\Website\m atchtek\sample\docs\dsp_nav_ma
    in.cfm:4) at
    cfbodycontent2ecfm1488737299.runPage(D:\Website\ma tchtek\sample\docs\bodycontent
    ..cfm:45) at
    cfindex2ecfm1521178899.runPage(D:\Website\matchtek \sample\docs\index.cfm:32)


    java.sql.SQLException: Data source "sample" 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
    cfdsp_nav_main2ecfm1837868689.runPage(D:\Website\m atchtek\sample\docs\dsp_nav_ma
    in.cfm:4)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343)
    at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.j ava:1908)
    at
    cfbodycontent2ecfm1488737299.runPage(D:\Website\ma tchtek\sample\docs\bodycontent
    ..cfm:45)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
    at
    coldfusion.filter.CFVariablesScopeFilter.invoke(CF VariablesScopeFilter.java:63)
    at coldfusion.tagext.lang.ModuleTag.doAfterBody(Modul eTag.java:333)
    at
    cfindex2ecfm1521178899.runPage(D:\Website\matchtek \sample\docs\index.cfm:32)
    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.PathFilter.invoke(PathFilter.jav a:86)
    at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50)
    at coldfusion.filter.BrowserDebugFilter.invoke(Browse rDebugFilter.java:52)
    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)







    --------------------------------------------------------------------------------
    Debugging Information ColdFusion Server Evaluation 7,0,0,91690
    Template /sample/index.cfm
    Time Stamp 25-Feb-05 08:30 AM
    Locale English (US)
    User Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
    1.1.4322)
    Remote IP 127.0.0.1
    Host Name 127.0.0.1





    --------------------------------------------------------------------------------
    Execution Time

    Total Time Avg Time Count Template
    47 ms 47 ms 1 D:\Website\matchtek\sample\docs\index.cfm
    31 ms 31 ms 1 D:\Website\matchtek\sample\docs\dsp_nav_main.cfm
    16 ms 16 ms 1 D:\Website\matchtek\sample\docs\Application.cfm
    16 ms 16 ms 1 D:\Website\matchtek\sample\docs\dsp_home.cfm
    0 ms 0 ms 1 D:\Website\matchtek\sample\docs\FormURL2Attributes .cfm
    0 ms 0 ms 1 D:\Website\matchtek\sample\docs\app_globals.cfm
    0 ms 0 ms 1 D:\Website\matchtek\sample\docs\bodycontent.cfm
    0 ms 0 ms 1 D:\Website\matchtek\sample\docs\dsp_header.cfm
    327 ms STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
    390 ms TOTAL EXECUTION TIME
    red = over 250 ms average execution time



    --------------------------------------------------------------------------------
    Exceptions

    08:30:51.051 - Database Exception - in
    D:\Website\matchtek\sample\docs\dsp_nav_main.cfm : line 4
    Data source sample could not be found.



    --------------------------------------------------------------------------------
    Scope Variables

    CGI Variables:
    AUTH_PASSWORD=
    AUTH_TYPE=
    AUTH_USER=
    CERT_COOKIE=
    CERT_FLAGS=
    CERT_ISSUER=
    CERT_KEYSIZE=
    CERT_SECRETKEYSIZE=
    CERT_SERIALNUMBER=
    CERT_SERVER_ISSUER=
    CERT_SERVER_SUBJECT=
    CERT_SUBJECT=
    CF_TEMPLATE_PATH=D:\Website\matchtek\sample\docs\i ndex.cfm
    CONTENT_LENGTH=
    CONTENT_TYPE=
    CONTEXT_PATH=
    GATEWAY_INTERFACE=CGI/1.1
    HTTPS=off
    HTTPS_KEYSIZE=
    HTTPS_SECRETKEYSIZE=
    HTTPS_SERVER_ISSUER=
    HTTPS_SERVER_SUBJECT=
    HTTP_ACCEPT=*/*
    HTTP_ACCEPT_ENCODING=gzip, deflate
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_CONNECTION=Keep-Alive
    HTTP_COOKIE=CFID=101; CFTOKEN=18864466
    HTTP_HOST=localhost
    HTTP_REFERER=
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
    1.1.4322)
    PATH_INFO=/sample/index.cfm
    PATH_TRANSLATED=D:\Website\matchtek\sample\docs\in dex.cfm
    QUERY_STRING=
    REMOTE_ADDR=127.0.0.1
    REMOTE_HOST=127.0.0.1
    REMOTE_USER=
    REQUEST_METHOD=GET
    SCRIPT_NAME=/sample/index.cfm
    SERVER_NAME=localhost
    SERVER_PORT=80
    SERVER_PORT_SECURE=0
    SERVER_PROTOCOL=HTTP/1.1
    SERVER_SOFTWARE=Microsoft-IIS/5.0
    WEB_SERVER_API=
    Cookie Variables:
    CFID=101
    CFTOKEN=18864466
    Session Variables:
    been_here=False
    cfid=101
    cftoken=18864466
    client_name=
    client_user_email=
    client_user_id=
    client_user_name=
    clientloggedin=False
    islogedin=False
    sessionid=sample & ASSOCIATES INVESTMENTS_101_18864466
    urltoken=CFID=101&CFTOKEN=18864466
    user_email=
    user_groups=Array (0)
    user_name=
    user_script=
    URL Parameters:
    PAGE=home
    SECTION=1
    SUBSECTION=
    Debug Rendering Time: 93 ms



    Macromedia santosh Guest

  2. Similar Questions and Discussions

    1. "NO TABLES FOUND" error despite database connection
      Hello all, I'm using XP sp2, updated Dreamweaver MX 2004, a simple MS Access database, using a remote testing server via OLE DB connection...
    2. "Contribute cannot verify your connection information"- Every other problem ruled out, but still no connection
      Hi, first, please allow me to give you the background info Client OS - Windows 2000/XP Pro Version - Contribute 2.01 - I installed the patch from...
    3. #25097 [Fbk->NoF]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
      ID: 25097 Updated by: sniper@php.net Reported By: huenerbe at dli-11 dot vcsystem dot com -Status: Feedback...
    4. #25097 [Fbk]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
      ID: 25097 Updated by: kalowsky@php.net Reported By: huenerbe at dli-11 dot vcsystem dot com Status: Feedback...
    5. #25097 [NEW]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
      From: huenerbe at dli-11 dot vcsystem dot com Operating system: Linux 2.4.x PHP version: 4.3.2 PHP Bug Type: ODBC related...
  3. #2

    Default Re: SQL database connection problem with dbtype="ODBC"

    hey santosh

    if u are using MSSQL then why do u want to use "ODBC Socket".
    CF supports MSSQL server builtin, you could simply make a "Microsoft SQL
    Server" based DSN in CF Admin ? any specific reason for using "ODBC Socket: ?

    refer to the following link if ur using MySQL
    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253[/url]


    prayank Guest

  4. #3

    Default Re: SQL database connection problem with dbtype="ODBC"

    Hi Prayank,

    Thanks for feedback.
    This is my first time to configure and work on coldfusion project. I not
    checked client code. He defines DSN value in global file. But your feedback
    helps to solve problem.

    Thanks friend

    Macromedia santosh Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139