Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

db engine cannot find the input table or query

Posted on 2007-03-28
12
Medium Priority
?
406 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 1000 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

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!

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

721 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