By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,537 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,537 IT Pros & Developers. It's quick & easy.

Error Executing Database Query

P: 53
my code is:


Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Employee List</title>
  4. </head>
  5. <body>
  6. <h1>Employee List</h1>
  7. <cfquery name="EmpList" datasource="cfdocexamples">
  8.     SELECT FirstName, LastName, Salary, Contract
  9.     FROM Employee
  10. </cfquery>
  11. <cfoutput query="EmpList">
  12. #EmpList.FirstName#, #EmpList.LastName#, #EmpList.Salary#, 
  13. #EmpList.Contract#<br>
  14. </cfoutput>
  15. </body>
  16. </html>
but while run on the browser with URL :http://localhost:8500/jesmi/employee.cfm, it gave following error message:

Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'Employee'. Make sure it exists and that its name is spelled correctly.

The error occurred in C:\CFusionMX\wwwroot\jesmi\employee.cfm: line 7

Expand|Select|Wrap|Line Numbers
  1. 5 : <body>
  2. 6 : <h1>Employee List</h1>
  3. 7 : <cfquery name="EmpList" datasource="cfdocexamples">
  4. 8 :     SELECT FirstName, LastName, Salary, Contract
  5. 9 :     FROM Employee


SQL SELECT FirstName, LastName, Salary, Contract FROM Employee
DATASOURCE cfdocexamples

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.1)
Remote Address
Date/Time 28-Apr-07 03:53 AM

Stack Trace (click to expand)
at cfemployee2ecfm1881328053.runPage(C:\CFusionMX\www root\jesmi\employee.cfm:7) at cfemployee2ecfm1881328053.runPage(C:\CFusionMX\www root\jesmi\employee.cfm:7)

Expand|Select|Wrap|Line Numbers
  1. java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query &apos;Employee&apos;.  Make sure it exists and that its name is spelled correctly.
  2.     at macromedia.sequelink.ssp.Diagnostic.toSQLException(Unknown Source)
  3.     at macromedia.sequelink.ssp.Chain.cnvDiagnostics(Unknown Source)
  4.     at macromedia.sequelink.ssp.Chain.decodeDiagnostic(Unknown Source)
  5.     at macromedia.sequelink.ssp.Chain.decodeBody(Unknown Source)
  6.     at macromedia.sequelink.ssp.Chain.decode(Unknown Source)
  7.     at macromedia.sequelink.ssp.Chain.send(Unknown Source)
  8.     at macromedia.sequelink.ctxt.stmt.StatementContext.execDirect(Unknown Source)
  9.     at macromedia.jdbc.sequelink.SequeLinkImplStatement.execute(Unknown Source)
  10.     at macromedia.jdbc.slbase.BaseStatement.commonExecute(Unknown Source)
  11.     at macromedia.jdbc.slbase.BaseStatement.executeInternal(Unknown Source)
  12.     at macromedia.jdbc.slbase.BaseStatement.execute(Unknown Source)
  13.     at coldfusion.server.j2ee.sql.JRunStatement.execute(
  14.     at coldfusion.sql.Executive.executeQuery(
  15.     at coldfusion.sql.Executive.executeQuery(
  16.     at coldfusion.sql.SqlImpl.execute(
  17.     at coldfusion.tagext.sql.QueryTag.doEndTag(
  18.     at cfemployee2ecfm1881328053.runPage(C:\CFusionMX\wwwroot\jesmi\employee.cfm:7)
  19.     at coldfusion.runtime.CfJspPage.invoke(
  20.     at coldfusion.tagext.lang.IncludeTag.doStartTag(
  21.     at coldfusion.filter.CfincludeFilter.invoke(
  22.     at coldfusion.filter.ApplicationFilter.invoke(
  23.     at coldfusion.filter.PathFilter.invoke(
  24.     at coldfusion.filter.ExceptionFilter.invoke(
  25.     at coldfusion.filter.ClientScopePersistenceFilter.invoke(
  26.     at coldfusion.filter.BrowserFilter.invoke(
  27.     at coldfusion.filter.GlobalsFilter.invoke(
  28.     at coldfusion.filter.DatasourceFilter.invoke(
  29.     at coldfusion.CfmServlet.service(
  30.     at jrun.servlet.ServletInvoker.invoke(
  31.     at jrun.servlet.JRunInvokerChain.invokeNext(
  32.     at jrun.servlet.JRunRequestDispatcher.invoke(
  33.     at jrun.servlet.ServletEngineService.dispatch(
  34.     at jrun.servlet.http.WebService.invokeRunnable(
  35.     at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(
  36.     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(
  37.     at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(
  38.     at
what may be the solution? is my database connectivity not proper or what else?
Apr 27 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Yes, it does seem that there is a database connectivity problem. Go to Data Sources in the CF Administrator and verify the sources.
Apr 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.