Pls show me where i went wrong. I've already tried a few
combinations, but i still can't make anything work... One time i got
a verty partial result, another time i got a blank result, and often
i get error codes. Thanks..
<%
Dim objRS
Dim objConn
Dim strDBPath
dim strCat1
dim strCat2
Dim mySQL
strDBPath=Server.MapPath("database" & "\" & "own.mdb")
set objRS = Server.CreateObject("ADODB.Recordset")
set objConn = Server.CreateObject("ADODB.Connection")
objConn.open = "Provider=Microsoft.Jet.Oledb.4.0;data source=" &
strDBPath & ";persist security info=false"
'from input query (query.asp?cat1=news&cat2=local)
strCat1 = (Request.QueryString("cat1"))
strCat2 = (Request.QueryString("cat2"))
objRS.ActiveConnection = objConn
'just want to show the contents of title and description rows where
the querystrings are met
'the db contains ff headers: ID - cate1 - cate2 - title - description
mySQL = "SELECT title, description FROM articles where cate1='" &
strCat1 & "' AND cate2= '" & strCat2 & "'"
set objRS=objConn.Execute (mySQL)
%>
<table border="1">
<tr>
<% objRS.MoveFirst %>
<% Do while Not objRS.EOF
'here i just wanna show the titles and descriptions
Response.Write "<td>" & objRS("title") & "</td>"
Response.Write "<td>" & objRS("description") & "</td>"
Wend %>
</tr>
</table>
</body>
</html>
<%
objRS.close
set objRS = Nothing
objConn.close
set objConn = Nothing
%>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/