SQL database connection problem with dbtype="ODBC"

Posted: 02-25-2005, 01:57 AM
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



Reply With Quote

Responses to "SQL database connection problem with dbtype="ODBC""

prayank
Guest
Posts: n/a
 
Re: SQL database connection problem with dbtype="ODBC"
Posted: 02-25-2005, 10:45 AM
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
http://www.macromedia.com/cfusion/kn...cfm?id=6ef0253


Reply With Quote
Macromedia santosh
Guest
Posts: n/a
 
Re: SQL database connection problem with dbtype="ODBC"
Posted: 02-25-2005, 04:26 PM
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

Reply With Quote
 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A (dirty) solution to the "corrupted database" issue loic_e_bertrand@yahoo.fr Adobe Indesign Macintosh 0 08-12-2005 11:13 AM
Work around for FHMX's "unexpectedly quit" problem? You decide... carrmichael webforumsuser@macromedia.com Macromedia Freehand 1 07-15-2003 07:02 PM
#22197 [Asn->Fbk]: "inline" functions cannot use "static" identifier sniper@php.net PHP Development 0 07-10-2003 10:51 PM
#24522 [Opn->Fbk]: MSSQL: "Changed database context to" error when running query fmk@php.net PHP Development 0 07-09-2003 10:20 PM
#24522 [Fbk->Opn]: MSSQL: "Changed database context to" error when running query cdcr440 at hotmail dot com PHP Development 0 07-09-2003 12:53 PM