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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object required, but which object!?

Status
Not open for further replies.

EvertonFC

Technical User
Nov 24, 2004
107
GB
Hello

I am getting the following error:

Microsoft JET Database Engine error '80004005'

Could not find
file 'D:\business\
/shout/shout.asp, line 19

I imagine this is because my server is looking for this string:

D:\business\mysite.com\html\shout\shout.mdb

but can't find it. There is a simple reason: it is not there.

The original code (from a free ASP site) is as follows:

<%

filepathx = Server.MapPath("shout.mdb")
Set dbconex = Server.CreateObject("ADODB.Connection")
dbconex.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePathx

%>

How would it be possible for me to use the server-preferred method of connecting to the database? When I have tried myself (using DRIVER etc), I either get an 'Expected end of statement' message or an 'Object required' message. Whatever I use, I know that dbconex is used later in the code, such as here:

Set rsText = dbconex.execute("SELECT * FROM sh, etc

dbconex.execute ("INSERT INTO shout (icon, sho, etc


Many thanks

Everton
 
To fix the path, read more about MapPath. You can start here:

For the "object required" error, find the line number that throws the error, then find the object on that line, then look up above to see where that object should have been created.
 
Optionally, you could also paste the code for that section that has the changes you had made to make it connect in your preferred way. It may be we can spot something fairly quickly that you had overlooked (second set of eyes and all that).

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top