Per a previous suggestion, I'm trying to use a parametized query in Access
2002. The query functions properly in Access. Now I'm trying to call it from
ASP. I'm using code I found at
http://www.xefteri.com/articles/apr302002/default.aspx and trying to adjust
for my needs. I'm getting this error. The query is there and functioning. It
appears that I'm not connecting. Can I get some more insight?
thanks!
------------------------------
Microsoft VBScript runtime (0x800A01A8)
Object required: 'qry_FindSongs 'White'
------------------------------
My connection string is
------------------------------
Dim conn, mdb, mdw, MM_GenKAccess_S TRING
set conn = CreateObject("A DODB.Connection ")
conn.Mode=adMod eRead
mdb = Server.MapPath( "songs.mdb" )
mdw = Server.MapPath( "system.mdw ")
MM_GenKAccess_S TRING = "Provider=Micro soft.Jet.OLEDB. 4.0; " & _
"Data Source=" & mdb & ";" & _
"Jet OLEDB:Database Password=xyz;" & _
"Jet OLEDB:System database=" & mdw
conn.open MM_GenKAccess_S TRING
------------------------------
<% OPTION EXPLICIT %>
<%
Dim T
T = "%"
If (Request("title ") <> "") Then
T = Request("title" )
End If
%>
<%
Dim A
A = "%"
If (Request("artis t") <> "") Then
A = Request("artist ")
End If
%>
<%
Dim C
C = "%"
If (Request("categ ory") <> "") Then
C = Request("catego ry")
End If
%>
<%
Dim TY
TY = "%"
If (Request("type" ) <> "") Then
TY = Request("type")
End If
%>
<%
Dim M
M = "%"
If (Request("manuf ") <> "") Then
M = Request("manuf" )
End If
%>
<%
Dim SA
SA = "%"
If (Request("singl eartist") <> "") Then
SA = Request("single artist")
End If
%>
<%
Dim rsResults
Set rsResults = Server.CreateOb ject("ADODB.Rec ordset")
rsResults.Activ eConnection = MM_GenKAccess_S TRING
rsResults = "qry_FindSo ngs '" & T & "', '" & A & "', '" & C & "', '" & TY &
"', '" & M & "', '" & SA & "'"
rsResults.Open rsResults, 0, 4
%>
2002. The query functions properly in Access. Now I'm trying to call it from
ASP. I'm using code I found at
http://www.xefteri.com/articles/apr302002/default.aspx and trying to adjust
for my needs. I'm getting this error. The query is there and functioning. It
appears that I'm not connecting. Can I get some more insight?
thanks!
------------------------------
Microsoft VBScript runtime (0x800A01A8)
Object required: 'qry_FindSongs 'White'
------------------------------
My connection string is
------------------------------
Dim conn, mdb, mdw, MM_GenKAccess_S TRING
set conn = CreateObject("A DODB.Connection ")
conn.Mode=adMod eRead
mdb = Server.MapPath( "songs.mdb" )
mdw = Server.MapPath( "system.mdw ")
MM_GenKAccess_S TRING = "Provider=Micro soft.Jet.OLEDB. 4.0; " & _
"Data Source=" & mdb & ";" & _
"Jet OLEDB:Database Password=xyz;" & _
"Jet OLEDB:System database=" & mdw
conn.open MM_GenKAccess_S TRING
------------------------------
<% OPTION EXPLICIT %>
<%
Dim T
T = "%"
If (Request("title ") <> "") Then
T = Request("title" )
End If
%>
<%
Dim A
A = "%"
If (Request("artis t") <> "") Then
A = Request("artist ")
End If
%>
<%
Dim C
C = "%"
If (Request("categ ory") <> "") Then
C = Request("catego ry")
End If
%>
<%
Dim TY
TY = "%"
If (Request("type" ) <> "") Then
TY = Request("type")
End If
%>
<%
Dim M
M = "%"
If (Request("manuf ") <> "") Then
M = Request("manuf" )
End If
%>
<%
Dim SA
SA = "%"
If (Request("singl eartist") <> "") Then
SA = Request("single artist")
End If
%>
<%
Dim rsResults
Set rsResults = Server.CreateOb ject("ADODB.Rec ordset")
rsResults.Activ eConnection = MM_GenKAccess_S TRING
rsResults = "qry_FindSo ngs '" & T & "', '" & A & "', '" & C & "', '" & TY &
"', '" & M & "', '" & SA & "'"
rsResults.Open rsResults, 0, 4
%>
Comment