473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Page which Displays data

46
Hi

This is my new post in this group.I always find good support in Access group.So hoping to get the same from this group also.I have a table with three columns in access table.Now i want to create a webpage which will ask input the serial no .When they press button, it should show in a table the related records in the table .Can any one help me by giving the code for doing this.or any good related links so that i can do it.My final aim is that if more than one user is there, they browse the page thru url and find the results.

Thanks in advance
Mar 25 '08 #1
2 1170
shweta123
692 Expert 512MB
Hi,

You can try this code for your requirement . Your page1.asp will contian the following code and it will used for taking the serial no input.

Expand|Select|Wrap|Line Numbers
  1.  
  2.         <html>
  3.         <head>
  4.         </head>
  5.         <body>
  6.              <form method="post" action = "Page2.asp">
  7.               <INPUT id="SerialNo"> 
  8.               <INPUT type="Submit" value="Submit">
  9.               </form>
  10.          </body> 
  11.          </html>
  12.  
Now , on page 2 write the following code for displaying the data.

Expand|Select|Wrap|Line Numbers
  1.  
  2.             <%
  3.                  Dim serialNo
  4.                  serialNo = Request.Form("SerialNo")
  5.  
  6.                  'Open the connection to the db
  7.                  Dim con
  8.                  set con = Server.CreateObject("Adodb.Connection")
  9.                  con.ConnectionString= "....."
  10.                  con.open
  11.  
  12.                  'Make the recordset
  13.                  Dim rs
  14.                  set rs = Server.CreateObject("Adodb.Recordset")
  15.  
  16.                  'Open recordset
  17.  
  18.                  Dim Sql  
  19.                  Sql = "Select columnname1,columnname2,...... columnnameN
  20.                   From tablename where Serialno = " & SerialNo &" 
  21.                   rs = con.execute(Sql)
  22.  
  23.                  'Display results from recordset on the page
  24.                  If not rs.Eof
  25.                       Response.write(rs.Fields(0))
  26.                      .............................
  27.                  End if 
  28.  
  29.                 'Close the recordset
  30.                 rs.close
  31.  
  32.                'Close the connection
  33.                con.close
  34.              %>
  35.  
  36.  


Hi

This is my new post in this group.I always find good support in Access group.So hoping to get the same from this group also.I have a table with three columns in access table.Now i want to create a webpage which will ask input the serial no .When they press button, it should show in a table the related records in the table .Can any one help me by giving the code for doing this.or any good related links so that i can do it.My final aim is that if more than one user is there, they browse the page thru url and find the results.

Thanks in advance
Mar 26 '08 #2
ramdil
46
Hi

Thanks for the help.
Mar 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Bill H | last post by:
I have a routine that displays 60 items (with thumbnails) per page. You can click any item and displays a new page with item details. When the user back pages it runs the query again to display all...
10
by: Manny | last post by:
I have a web form "Page1.asp" and it reads data from a database, does some calculations, and displays the records in pages. Works fine. I have a button that displays on the page, defined as...
3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
4
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
4
by: puja patel | last post by:
hi all, I am developing a shopping cart website in C# where after selecting item, user enters credit card details and click on submit button.This request is then processed by the gateway which...
1
by: ASF | last post by:
I have a 2.0 framework page that has several texboxes, a gridview, and a sqldatasource. The user enters criteria in the textboxes, clicks a button, and the gridview displays the appropriate data....
3
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a...
0
by: peck2000 | last post by:
Hope someone can help ... I'm adapting the Classified application in BEGINNING ASP 3.0 (Wrox) to a comic-book collection tracker. Consequently, I'm making some changes to the way the application...
2
by: Hrvoje Vrbanc | last post by:
Hello! I have an ASP.NET page that displays some data from an SQL Server 2005 database, using a Select query. The database is updated by another piece of software, independently of the ASP.NET...
2
by: JRough | last post by:
I have this code that switches templates depending on if the user fills in a form with a request. The request asks for the $mark & $number. If that request gets input then it displays a list...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.