S
shank
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_STRING
set conn = CreateObject("ADODB.Connection")
conn.Mode=adModeRead
mdb = Server.MapPath("songs.mdb")
mdw = Server.MapPath("system.mdw")
MM_GenKAccess_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & mdb & ";" & _
"Jet OLEDBatabase Password=xyz;" & _
"Jet OLEDB:System database=" & mdw
conn.open MM_GenKAccess_STRING
------------------------------
<% OPTION EXPLICIT %>
<%
Dim T
T = "%"
If (Request("title") <> "") Then
T = Request("title")
End If
%>
<%
Dim A
A = "%"
If (Request("artist") <> "") Then
A = Request("artist")
End If
%>
<%
Dim C
C = "%"
If (Request("category") <> "") Then
C = Request("category")
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("singleartist") <> "") Then
SA = Request("singleartist")
End If
%>
<%
Dim rsResults
Set rsResults = Server.CreateObject("ADODB.Recordset")
rsResults.ActiveConnection = MM_GenKAccess_STRING
rsResults = "qry_FindSongs '" & 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_STRING
set conn = CreateObject("ADODB.Connection")
conn.Mode=adModeRead
mdb = Server.MapPath("songs.mdb")
mdw = Server.MapPath("system.mdw")
MM_GenKAccess_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & mdb & ";" & _
"Jet OLEDBatabase Password=xyz;" & _
"Jet OLEDB:System database=" & mdw
conn.open MM_GenKAccess_STRING
------------------------------
<% OPTION EXPLICIT %>
<%
Dim T
T = "%"
If (Request("title") <> "") Then
T = Request("title")
End If
%>
<%
Dim A
A = "%"
If (Request("artist") <> "") Then
A = Request("artist")
End If
%>
<%
Dim C
C = "%"
If (Request("category") <> "") Then
C = Request("category")
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("singleartist") <> "") Then
SA = Request("singleartist")
End If
%>
<%
Dim rsResults
Set rsResults = Server.CreateObject("ADODB.Recordset")
rsResults.ActiveConnection = MM_GenKAccess_STRING
rsResults = "qry_FindSongs '" & T & "', '" & A & "', '" & C & "', '" & TY &
"', '" & M & "', '" & SA & "'"
rsResults.Open rsResults, 0, 4
%>