Can anyone please help me by pointing out why this is not working and gives a configuration error.
Code:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("C:\Inetpub\vhosts\weekdayweddings.net\httpdocs\wdw\weddingphotographers.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT Photographer, Postcode FROM details", conn
%>
I know the database is OK and can be connected to because I use it with another code returning results from a form with user input. All this is in the same root folder. The successful code looks like this.
Code:
<%
u_search=request.form("u_search")
u_where=request.form("u_where")
if u_search = "" or u_where= "" then
response.redirect "searchinput.asp"
end if
accessdb="weddingphotographers"
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * from fullpups where " & u_where &" like '%%"& u_search & "%%'"
rs.Open sql, cn
If rs.eof then
search="nothing"
end if
%>
But it is of course a different kind usage. In the former I am trying to establish a connection simply to call a function that populates a table with single pieces of data. e.g. x when y=3.
I know I am slow on understanding but any help would be appreciated.