Solved

db engine cannot find the input table or query

Posted on 2007-03-28
12
400 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
Technology Partners: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
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.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

632 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