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:

[U]employee.cfm[/u]

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
  6.  

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

SQL SELECT FirstName, LastName, Salary, Contract FROM Employee
DATASOURCE cfdocexamples
VENDORERRORCODE -1305
SQLSTATE 42S02

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 127.0.0.1
Referrer
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(JRunStatement.java:212)
  14.     at coldfusion.sql.Executive.executeQuery(Executive.java:974)
  15.     at coldfusion.sql.Executive.executeQuery(Executive.java:886)
  16.     at coldfusion.sql.SqlImpl.execute(SqlImpl.java:229)
  17.     at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:447)
  18.     at cfemployee2ecfm1881328053.runPage(C:\CFusionMX\wwwroot\jesmi\employee.cfm:7)
  19.     at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
  20.     at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
  21.     at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
  22.     at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107)
  23.     at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
  24.     at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
  25.     at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
  26.     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
  27.     at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
  28.     at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
  29.     at coldfusion.CfmServlet.service(CfmServlet.java:105)
  30.     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
  31.     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
  32.     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
  33.     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
  34.     at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
  35.     at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
  36.     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
  37.     at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
  38.     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
  39.  
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


acoder
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.