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

Error '80004005' running Access ASP export

Status
Not open for further replies.

bluecjh

Programmer
Mar 12, 2003
385
0
0
I have just got asp running on an intranet, I thought
I would test this with an access asp export of a very
simple form.

when publishing the asp page i get

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

...
/folder1/folder2/frmfaq.asp line 18

The bit of code is:

<!--The following token places all object output inside the <BODY> tag.--><%
Session.timeout = 5
If IsObject(Session("eOASys_FAQs_conn")) Then
Set conn = Session("eOASys_FAQs_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "eOASys_FAQs","",""
Set Session("eOASys_FAQs_conn") = conn
End If
%>
<%
If IsObject(Session("Form_frmFAQs_rs")) Then
Set rs = Session("Form_frmFAQs_rs")
Else
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT * FROM [tblFAQs]", conn, 3, 3
If rs.eof Then
rs.AddNew
End If
Set Session("Form_frmFAQs_rs") = rs
End If
%>
<%


line 18 is rs.Open "SELECT * FROM [tblFAQs]", conn, 3, 3

I would have expected the code to be faultless as it is an access export not written by me.

I am using a system dsn on the server.

any ideas?
thanks
chris.
 
So what code line did it crap out on you? line 18 doesn't help to much.
 
candyman :
line 18 is rs.Open "SELECT * FROM [tblFAQs]", conn, 3, 3

secondly you're passing the OPENED connection object to a session value, not overly wise, if the session expires, what closes the Con?

remove the session statements and try to connect to the db directly from in page

' REMMED If IsObject(Session("eOASys_FAQs_conn")) Then
' REMMED Set conn = Session("eOASys_FAQs_conn")
' REMMED Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "eOASys_FAQs","",""
[COLOR=black cyan]'---------------^ is this a DSN? should be "DSN=BLAH" if not, i believe the parameters you have as "" might be necessary too, i dont typically use this type of connection for connection objects or recordsets[/color]
' REMMED Set Session("eOASys_FAQs_conn") = conn
' REMMED End If

[thumbsup2]DreX
aKa - Robert
 
Thanks DreXor .. will try this out on monday.
 
DreXor tried that but no success,
The bit of code became:

<!--The following token places all object output inside the <BODY> tag.--><%
Set conn = Session("eOASys_FAQs_conn")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "eOASys_FAQs","",""
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT * FROM [tblFAQs]", conn, 3, 3
If rs.eof Then
rs.AddNew
End If
%>
<%

but it still failed at line 6:
conn.open "eOASys_FAQs","",""

I have tested the odbc system dsn by running
a test program to obtain a recordset of the access database in question, this succeeded so I assumed the dsn wasn't a problem?
 
using a system dsn ?

change that line to


conn.open "dsn=eOASys_FAQs"

that shoudl patch it up

[thumbsup2]DreX
aKa - Robert
 
No still fails, I thought it was maybe a permissions
problem on the server but viewing peermissions
on the file directorys and the database itself
the IUSR account has full control?
 
Hi.

You're right - it is a permission issue. You need to check permissions within the Access database (don't use access if you can help it!), as well as the database files, the database folder, and the components that open the database (I assume ADODB).

John.

mf_of_john.gif
 
I just tried setting folder and database file permissions
to everyone, and 'voila' i progress but get the same error
message on line 18:(see top for whole piece of code)

rs.Open "SELECT * FROM [tblFAQs]", conn, 3, 3

so I have managed to make a connection but no recordset?
 
may want to try

set rs = conn.execute("SELECT * FROM [tblFAQs]")

[thumbsup2]DreX
aKa - Robert
 
I will try, incidentally I have managed to get data from
my db to the asp page using oledb and I suppose I will
go that route, it's annoying though. It would seem it is not a permissions problem. ?
 
bluecjh,

I suggest you look at my thread titled "ASP Provider = Connection Error". Pyrohonnist offered a suggestion toward the bottom that worked. However, I've had to revisit this frequently and re-do it daily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top