•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 397,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,431 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1118 | Replies: 5 | Solved
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Rep Power: 1
Solved Threads: 0
Hi guys!
I was wondering if any of you guys would be able to help solve what is probably a simple problem....
I am using dreamweaver / asp/ access to create a dynamic web application. I have created a record set which queries the database and displays the results. The recordset searches for a product id which is inserted by the user, the product details are then displayed. I somehow can only get the first record in the database to display in the dynamic table. This record is not even searched for it is just there already when i preview the page in the browser then when I enter another ID nothing happens.
here is my code :-
Any ideas would be greatly appreciated! Thanks!!!
GLT
I was wondering if any of you guys would be able to help solve what is probably a simple problem....
I am using dreamweaver / asp/ access to create a dynamic web application. I have created a record set which queries the database and displays the results. The recordset searches for a product id which is inserted by the user, the product details are then displayed. I somehow can only get the first record in the database to display in the dynamic table. This record is not even searched for it is just there already when i preview the page in the browser then when I enter another ID nothing happens.
here is my code :-
asp Syntax (Toggle Plain Text)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/dbtest.asp" --> <% Dim rs_search__MMColParam rs_search__MMColParam = "1" If (Request.Form("ProductID") <> "") Then rs_search__MMColParam = Request.Form("ProductID") End If %> <% Dim rs_search Dim rs_search_numRows Set rs_search = Server.CreateObject("ADODB.Recordset") rs_search.ActiveConnection = MM_dbtest_STRING rs_search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(rs_search__MMColParam, "'", "''") + " ORDER BY ProductID ASC" rs_search.CursorType = 0 rs_search.CursorLocation = 2 rs_search.LockType = 1 rs_search.Open() rs_search_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 10 Repeat1__index = 0 rs_search_numRows = rs_search_numRows + Repeat1__numRows %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>search</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body>Insert product ID you wish to search for:- <form method="POST" name="formsearch" id="formsearch"> <table width="528" height="136" border="1"> <tr> <td width="153">productID</td> <td width="359"><input name="txtProductID" type="text" id="txtProductID" size="50"></td> <td><input name="btnsearch" type="submit" id="btnsearch" value="search"></td> </tr> </table> <input type="hidden" name="MM_search" value="formsearch"> </form> <p> </p> <table border="1"> <tr> <td>ProductID</td> <td>Product</td> <td>Price</td> </tr> <% While ((Repeat1__numRows <> 0) AND (NOT rs_search.EOF)) %> <tr> <td><%=(rs_search.Fields.Item("ProductID").Value)%></td> <td><%=(rs_search.Fields.Item("Product").Value)%></td> <td><%= FormatCurrency((rs_search.Fields.Item("Price").Value), 2, -2, -2, -2) %></td> </tr> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_search.MoveNext() Wend %> </table> </body> </html> <% rs_search.Close() Set rs_search = Nothing %>
Any ideas would be greatly appreciated! Thanks!!!

GLT
Last edited by peter_budo : Mar 27th, 2008 at 2:42 am. Reason: Keep It Organized - please use [code] tags
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
access advice breach broadband business code combo crime cult of the dead cow daniweb data data protection data transfer database dreamweaver drive dropdownlist encryption europe forensic forensics fun google government hacking hard hardware help hitachi hp html industrial espionage it linux module net news payment services privacy protection reuse search security storage terabyte tv web wikipedia wysiwyg
- Previous Thread: Restrict Access to page.
- Next Thread: windows server 2003 service pack 2



Threaded Mode