Solved

db engine cannot find the input table or query

Posted on 2007-03-28
12
396 Views
Last Modified: 2012-06-21
Hi,

I have this page that works fine
http://www.cadante.com/cadante_css/vini.asp

Then I need another similar page displaying other products, I proceeded like this:

copied the access table "Vino" to have a new table, which I named "Alimenti", then I changed some field names, then I copied the vini.asp page, and named it "distillati.asp" and changed the line calling the data
Select * FROM Vino ORDER BY TipoVino
to
Select * FROM Alimenti ORDER BY Alimento

I uploaded and when going to
http://www.cadante.com/cadante_css/distillati.asp
I get this:

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'Alimenti'. Make sure it exists and that its name is spelled correctly.
/cadante_css/distillati.asp, line 9

What did I do wrong, and how to fix it?

Thank you
0
Comment
Question by:keneso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 18807215
Is the table name 'Alimenti' exist in the database?
can u post the code part of distillati.asp?
0
 
LVL 7

Author Comment

by:keneso
ID: 18807234
Hmmm ... did you read thru the question? ;)

Yes the "alimenti" has been created, and does have few data in it

And the code in the distillati.asp is the one I also posted:

Select * FROM Alimenti ORDER BY Alimento
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 18807257
yeah...but more information is needed to troubleshoot...;)

check your database connectionstring, whether it is pointing to the right database.

posting the full code will save lot of time keneso :)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:keneso
ID: 18807287
>>check your database connectionstring, whether it is pointing to the right database.

To check that I put the
Select * FROM Vino ORDER BY TipoVino

and it works fine, ie the page opens, and when I change it back to
Select * FROM Alimenti ORDER BY Alimento

it returns the error.

I also tried changing the table name in the db, but seems the only table working is the "Vino"
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 18807325
Just copy the below code and paste in the page distillati.asp somewhere before your 'select' query. It will listout the table names in the database. Paste the results here:

----------------------------------------------------------------------------------------------
Dim rstSchema, rstStructure
Const adSchemaTables = 20
Set rstSchema = dbobj.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
Response.Write "Table name: " & rstSchema("TABLE_NAME") & vbCr & "Table type: " & rstSchema("TABLE_TYPE") & vbCr & "<BR>"
response.write rstSchema("TABLE_SCHEMA")
rstSchema.MoveNext
Loop
ListTables = True
0
 
LVL 7

Author Comment

by:keneso
ID: 18807452
Thanks.

I did, and I get this error

============= ERROR

Microsoft VBScript runtime  error '800a01a8'
Object required: ''
/cadante_css/distillati.asp, line 10


Anyway here is the full code (including the one you posted) regarding the issue:

=========== CODE

<%
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../mdb-database/databasevini.mdb") & ";UID=;PWD="
Set Conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Conn.Open sConnString
Dim rstSchema, rstStructure
Const adSchemaTables = 20
Set rstSchema = dbobj.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
Response.Write "Table name: " & rstSchema("TABLE_NAME") & vbCr & "Table type: " & rstSchema("TABLE_TYPE") & vbCr & "<BR>"
response.write rstSchema("TABLE_SCHEMA")
rstSchema.MoveNext
Loop
ListTables = True
sSql = "select * from Alimenti ORDER BY Alimento"
rs.Open sSql, Conn
%>
0
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 250 total points
ID: 18807499
oops...change 'dbobj' in my code to 'conn' like this: AND CHECK NOW.

<%
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../mdb-database/databasevini.mdb") & ";UID=;PWD="
Set Conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Conn.Open sConnString
Dim rstSchema, rstStructure
Const adSchemaTables = 20
Set rstSchema = Conn.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
Response.Write "Table name: " & rstSchema("TABLE_NAME") & vbCr & "Table type: " & rstSchema("TABLE_TYPE") & vbCr & "<BR>"
response.write rstSchema("TABLE_SCHEMA")
rstSchema.MoveNext
Loop
ListTables = True
sSql = "select * from Alimenti ORDER BY Alimento"
rs.Open sSql, Conn
%>
0
 
LVL 7

Author Comment

by:keneso
ID: 18807615
Thank you.

Looks like the problem is th db, as the copied table is not seen.

=========== RESULT

Table name: MSysAccessObjects Table type: SYSTEM TABLE
Table name: MSysACEs Table type: SYSTEM TABLE
Table name: MSysObjects Table type: SYSTEM TABLE
Table name: MSysQueries Table type: SYSTEM TABLE
Table name: MSysRelationships Table type: SYSTEM TABLE
Table name: Vino Table type: TABLE

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'Alimenti'. Make sure it exists and that its name is spelled correctly.
/cadante_css/distillati.asp, line 18
0
 
LVL 3

Expert Comment

by:VAScott
ID: 18807687
Try looking at the "last updated" date of the access DB on the server.  I think with access, if there's open connections to the DB when you try to upload it, it won't let you.
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 18807922
thanks ;)
0
 
LVL 7

Author Comment

by:keneso
ID: 18808308
>>VAScott

Sorry I missed to reply, the date and time are ok, I also redownloaded the db to make sure, as that was one of the first thing that came to my mind.
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 18813729
keneso, is the page working now? did u upload the db again?
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question