Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Database Errors

New Here ,
Jan 12, 2010 Jan 12, 2010

Hello All,

I am taking a Coldfusion class and hav completed the projects. The problem is that the database works fine on my PC but when uploaded to the school's server there is always an error (such as (Datasource studentinfo could not be found) when I access the page on the school's server. The teacher said I did not properly name the database. Any ideas on "how to properly name the db"?

Thank you,

TOPICS
Database access
722
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

My opinion is different than your teacher's.

There are two prerequisites for a datasource to be recognized.  First, the database has to be made available to ColdFusion.  Second, a datasource has to be set up on ColdFusion by the Administrator.

Were both steps done?

If so, does datasource "studentinfo" point to your database?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2010 Jan 12, 2010

Dan, thanx for your response. The datasource was set on conldfusion8 via the admin login on my local computer so it works fine, however, this is not the case for the school server because I simply uploaded the assignments and projects to the school server without the ability for me to create the datasource on the school server. Although in each student's Database folder on the school server there is a DSNXXXX.mdb file, I'm not sure if this file is supposed to specify the datasource per student. Any ideas?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2010 Jan 12, 2010

Here is one of the errors;

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

Datasource signup could not be found.

The error occurred inD:\sololizmi\Students\0103\homeworks\week10\signup.cfm: line 10
8 : <body>
9 : 
10 : <cfquery name="qgetguests" datasource="signup">
11 : select FirstName, LastName, Email
12 : from signup

DATASOURCE  signup
Resources:

Browser  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.64 Safari/532.5
Remote Address  208.58.77.206
Referrer  http://160.253.0.40/Students/Students/0103/homeworks/week10/index.cfm
Date/Time  12-Jan-10 04:44 PM
Stack Trace
at cfsignup2ecfm2073356486.runPage(D:\sololizmi\Students\0103\homeworks\week10\signup.cfm:10) at cfsignup2ecfm2073356486.runPage(D:\sololizmi\Students\0103\homeworks\week10\signup.cfm:10)

java.sql.SQLException: Datasource signup could not be found.
     at coldfusion.sql.DataSrcImpl.validate(DataSrcImpl.java:95)
     at coldfusion.sql.SqlImpl.validate(SqlImpl.java:279)
     at coldfusion.tagext.sql.QueryTag.doStartTag(QueryTag.java:467)
     at cfsignup2ecfm2073356486.runPage(D:\sololizmi\Students\0103\homeworks\week10\signup.cfm:10)
     at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
     at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
     at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
     at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
     at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
     at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
     at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
     at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
     at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
     at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
     at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
     at coldfusion.CfmServlet.service(CfmServlet.java:175)
     at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
     at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
     at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
     at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
     at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
     at jrun.servlet.FilterChain.service(FilterChain.java:101)
     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
     at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
     at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
     at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

I neither work at your school nor am I a student.  Therefore I don't know what instructions you were given.

In this thread though, you say that you were told that you didn't name your database correctly.  You also say that you are given a database named DSNXXX.mdb to use.

My interpretation is that the school set you up properly.  Your database tables should be in the mdb file provided, and in your cfquery tags, your dsn is probably dsnxxx, or just xxx.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2010 Jan 13, 2010

I missed a couple of classes due to flu and the teacher is giving me a hard time instead of directing to what I may be missing. Although the DSNXXX.mdb file does not seem to contain anything when I open it in Office Access, where and how would I use the DSNXXX.mdb in the cfquery tags? Here is my signup.cfm code;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

<body>

<cfquery name="qgetguests" datasource="signup">

select FirstName, LastName, Email

from signup

order by FirstName;

</cfquery>

<table style="margin-top:40px; width:30%" border="1" cellpadding="0" cellspacing="0" align="center">

<tr>

<th>First Name</th>

<th>Last Name</th>

<th>Email</th>

</tr>

<cfoutput>

<tr>

<td align="center">#qgetguests.FirstName#</td>

<td align="center">#qgetguests.LastName#</td>

<td align="center">#qgetguests.Email#</td>

</tr>

</cfoutput>

</table>

</body>

</html>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2010 Jan 13, 2010

From your response so far, I am getting the idea that I need to move all my database tables into the DSNXXX.mdb file and make datasource="DSNXXX". Is this correct?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 13, 2010 Jan 13, 2010

Moving all your tables to the dsnxxx.mdb file makes sense.

As far as your coldfusion dsn name goes, you either use trial and error or ask the school.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2010 Jan 13, 2010
LATEST

Hey Dan, That is what it is. I moved all my tables to the DSNXXX.mdb file and made datasource="DSNXXX" (XXX is my student # in the class). Thanx a lot.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources