Arizona
08-07-2006, 11:06 AM
Hi...I'm new here and am terrible at explaining things so please bare with me...
I'm trying to get a products page up and running for a project site. This is the asp code for the two pages needed so far:
PAGE 1:
<%
Dim mySQL, myRS
Set myRS = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT CategoryID, Category FROM Categories"
myRS.Open mySQL, myConn
Response.Write "<p>Product Categories:</p><p class='tiny'>"
Do While Not myRS.EOF
Response.Write "<a href='category.asp?CategoryID=" &_
myRS("CategoryID") & "&CartID=" & CartID &_
"'>" & myRS("Category") & "</a><br>"
myRS.MoveNext
Loop
Response.Write "</p>"
myRS.Close
%>
PAGE2:
<%
Dim mySQL, myRS, CategoryID
CategoryID = CInt(Request.QueryString("CategoryID"))
mySQL = "SELECT ProductID, Title, Price, Category " &_
"FROM Products " &_
"WHERE Products.CategoryID = " & CategoryID
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open mySQL, myConn
Response.Write "<p>The products in the category of <b>" &_
myRS("Category") & "</b> are shown below:"
While Not myRS.EOF
Response.Write "<p><big><b><a href='shopping(prod.asp?ProductID=" &_
myRS("ProductID") & "&CartID=" & CartID & "'>" & myRS("Title") & "</a></b></big><br>"
Response.Write "<b>Catalog Code:</b> " & myRS("ProductID") &_
" <b>Price:</b> $" & FormatNumber(myRS("Price"),2) & "</p>"
Call AddToCartForm
myRS.MoveNext
Wend
%>
However I keep getting the error:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/ISPD/category.asp, line 26
Line 26 is:
myRS.Open mySQL, myConn
I really dont understand where I'm going wrong. :(
Can anyone help me...sorry if I haven't explained very well...
I'm trying to get a products page up and running for a project site. This is the asp code for the two pages needed so far:
PAGE 1:
<%
Dim mySQL, myRS
Set myRS = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT CategoryID, Category FROM Categories"
myRS.Open mySQL, myConn
Response.Write "<p>Product Categories:</p><p class='tiny'>"
Do While Not myRS.EOF
Response.Write "<a href='category.asp?CategoryID=" &_
myRS("CategoryID") & "&CartID=" & CartID &_
"'>" & myRS("Category") & "</a><br>"
myRS.MoveNext
Loop
Response.Write "</p>"
myRS.Close
%>
PAGE2:
<%
Dim mySQL, myRS, CategoryID
CategoryID = CInt(Request.QueryString("CategoryID"))
mySQL = "SELECT ProductID, Title, Price, Category " &_
"FROM Products " &_
"WHERE Products.CategoryID = " & CategoryID
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open mySQL, myConn
Response.Write "<p>The products in the category of <b>" &_
myRS("Category") & "</b> are shown below:"
While Not myRS.EOF
Response.Write "<p><big><b><a href='shopping(prod.asp?ProductID=" &_
myRS("ProductID") & "&CartID=" & CartID & "'>" & myRS("Title") & "</a></b></big><br>"
Response.Write "<b>Catalog Code:</b> " & myRS("ProductID") &_
" <b>Price:</b> $" & FormatNumber(myRS("Price"),2) & "</p>"
Call AddToCartForm
myRS.MoveNext
Wend
%>
However I keep getting the error:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/ISPD/category.asp, line 26
Line 26 is:
myRS.Open mySQL, myConn
I really dont understand where I'm going wrong. :(
Can anyone help me...sorry if I haven't explained very well...