cyprus106
Programmer
- Apr 30, 2001
- 654
I've got a database with a list of specific parts. The list of parts is displayed on my 'automotive.asp' page and then if you click the 'more info' link on the page, it loads up 'moreinfo.asp?Item= and the name of the item.
Then in moreinfo, I load up the database and I want it to say loop through until the table items name = the Request("Item" name.
I tried a 'do...until' but I know I'm doing this wrong somehow. I'll post the code I can but I think I need a new way of doing this.
;note: the strConnect is, of course, my connection string
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnect
Dim strSQL
Dim rsItem
set rsItem = Server.CreateObject("ADODB.Recordset"
strSQL = "SELECT * FROM Items;"
rsItem.Open strSQL, objConn
do
if Request("Item" = "R-1 Strut Bars" then
response.write _
"writes lots of stuff..."
rsItem.MoveNext
end if
Loop until Request("Item" = rsItem("Name"
I'm fairly new with ASP. If there's another way I should do this or you need something else let me know.
Thanks a lot, I've been working for a full week on this stupid page and it's the absolute last little piece I have left. Cyprus
Then in moreinfo, I load up the database and I want it to say loop through until the table items name = the Request("Item" name.
I tried a 'do...until' but I know I'm doing this wrong somehow. I'll post the code I can but I think I need a new way of doing this.
;note: the strConnect is, of course, my connection string
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnect
Dim strSQL
Dim rsItem
set rsItem = Server.CreateObject("ADODB.Recordset"
strSQL = "SELECT * FROM Items;"
rsItem.Open strSQL, objConn
do
if Request("Item" = "R-1 Strut Bars" then
response.write _
"writes lots of stuff..."
rsItem.MoveNext
end if
Loop until Request("Item" = rsItem("Name"
I'm fairly new with ASP. If there's another way I should do this or you need something else let me know.
Thanks a lot, I've been working for a full week on this stupid page and it's the absolute last little piece I have left. Cyprus