Forum Moderators: open
I have a database connection and subsequent script that works fine when it is all in one page. I get 500 errors when trying to take the connection to an external file. This is baffling me.
Connection file:
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\thedb.mdb"))
response.write("working")
Page Requiring Connection
<!--#include file="thedb/dbconn.asp" -->
Any ideas, I did this years ago with MM, but it just did it for you.
Page Requiring Connection
<!--#include file="thedb/dbconn.asp" -->
This uses relative addressing so it looks for the connection file in a subdir of the current folder called "thedb". Should this instead be an absolute url (i.e. thedb is a root folder)? If so, try:
<!--#include virtual="/thedb/dbconn.asp" -->
HTH