Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft JET Database Engine error '80040e37'

Status
Not open for further replies.

yajmere

Programmer
Jan 3, 2002
12
US
I had created a file called as openconn.asp to create connections.I am including that page in every page so that I dont have to write code for connection in every page. IT is opening Connection correctly. in index.asp page i have opened a recordset. But recordset is throwing error. If i give only table name it says "Invali sql Statement" and something that it needs valid sql query like Insert, Update, Delete or Select. SO I had created a sekect SQL query as "Select * from Usr", but now it shows error messege -
Microsoft JET Database Engine error '80040e37' or -2147217865

The Microsoft Jet database engine cannot find the input table or query 'Usr'. Make sure it exists and that its name is spelled correctly.

/ya/Index.asp, line 25

I am enclosing the code for both openconn.asp and Index.asp pages. One more thing I had asked web server admin to give write privileges on directory Database. So that the fil is also not read only. Also I have removed Object tags and using ADO connection string as suggested by you. Now why is this new error coming up.

Can you please help me to solve this.

Thanks And Regards

Rajiv

Code in Index.asp
*******************************

<%@ Language=VBScript %>

<!--#include file=&quot;openconn.asp&quot; -->

<html>
<head>
<title> Patient History System </title>
<meta NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
</head>
<%

Dim uid,pwd

uid = Request.Form (&quot;userid&quot;)
pwd = Request.Form (&quot;password&quot;)
IF Rs.STATE = 1 THEN
Rs.CLOSE()
END IF

Rs.ActiveConnection = dbObj
Rs.CursorType = adOpenKeySet
Rs.LockType = adLockOptimistic
Rs.Source = &quot;select * from usr&quot;',dbobj,3,1
Rs.Open

Response.Write &quot;RS Stare&quot; & RS.State


*******************************

Code in Connopen.asp
*******************************
<%'connection to admin.mdb
Dim dbObj, RS, RSOther
set dbObj = server.createobject(&quot;ADODB.connection&quot;)
set RS = server.createobject(&quot;ADODB.Recordset&quot;)
set RSOther = server.createobject(&quot;ADODB.Recordset&quot;)
curdir= server.mappath(&quot;/jurix/database/admin.mdb&quot;)

set dbobj = server.CreateObject(&quot;ADODB.Connection&quot;)


dbObj.open &quot;PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=&quot; & curdir &&quot;;Persist Security Info=False&quot;
%>

******************************************

 
is there a table called usr in your admin.mdb db? and is that the exact spelling of the table name?
 
I'm sure these guys will know alot more than I do, but Microsoft notes the error as:

0x80040E37 -2147217865 The specified table does not exist

I noticed you have !--#include file=&quot;openconn.asp&quot; -

Then on the asp page title you have Code in Connopen.asp check it's saved name. Hopefully just a typo when you wrote the forum. Other things to check, the connection page in the same directory as the database or one level below.

For example - Index.asp is located at
/ya/index.asp is openconn.asp also located in /ya/ directory or do you need a further path - like /ya/connections/openconn.asp

Just a couple basic things to check. In adition that you do have a table named Usr.

hope it helps

Stuart
 
if you called the include file by the wrong name, it would kick that error out right away with a file not found error or such.
and it would give a different error if the database couldn't be found either.
so i really think you may have a typo, or maybe don't even have a &quot;usr&quot; table?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top