473,651 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query Database, Display as hyperlink

I am using ASP with VBScript. I want to query an access database username
field, and display the output as a hyperlink on an a webpage.The webpage
will display all records. I then need to be able to select a given
record(hyperlin k), and display all of the fields for that record on another
webpage so I can execute some code against it.

Can anyone point me to some sample code so I can get an idea of how to
accomplis this?

Thanks in advance
Jun 20 '07 #1
3 3179
Gazing into my crystal ball I observed "BOBss" <Bo***@123.comw riting
in news:uM******** ******@TK2MSFTN GP06.phx.gbl:
I am using ASP with VBScript. I want to query an access database
username field, and display the output as a hyperlink on an a
webpage.The webpage will display all records. I then need to be able
to select a given record(hyperlin k), and display all of the fields for
that record on another webpage so I can execute some code against it.

Can anyone point me to some sample code so I can get an idea of how to
accomplis this?

Thanks in advance
<%

dim sql, rs, rsarr, norecords, i

'I don't know your fieldnames, just assuming here

sql = "SELECT id, username FROM table "
set rs = createobject("A DODB.Recordset" )
rs.Open sql, yourconnection
if not rs.EOF then
rsarr = rs.getrows()
norecords = false
else
norecords = true
end if
rs.Close
set rs = nothing

if not norecords then
%>
<ul>
<%
for i = 0 to ubound(rsarr,2)
%>
<li><a href="processpa ge.asp?id=<%=rs arr(0,i)%>"><%= rsarr(1,i)%></li>
%>
next
%>
</ul>
<%
else
%>
<p>No records available.</p>
<% end if%>

---- processpage.asp ----
<% id = request.queryst ring("id")
sql = "SELECT fields FROM table WHERE id = " & id
'do whatever else you need to do from here

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 21 '07 #2
Adrienne Boswell wrote on 21 jun 2007 in
microsoft.publi c.inetserver.as p.general:
<li><a href="processpa ge.asp?id=<%=rs arr(0,i)%>"><%= rsarr(1,i)%></li>
</a?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 21 '07 #3
Gazing into my crystal ball I observed "Evertjan."
<ex************ **@interxnl.net writing in news:Xns9956642 2D4289eejj99@
194.109.133.242 :
Adrienne Boswell wrote on 21 jun 2007 in
microsoft.publi c.inetserver.as p.general:
><li><a href="processpa ge.asp?id=<%=rs arr(0,i)%>"><%= rsarr(1,i)%></li>

</a?
Validation Failed - XXX Errors

It was late, sorry about that.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3956
by: Mike Cocker | last post by:
Hello, I'm quite weak at PHP, so I was hoping to get some help understanding the below code. First off, I'm trying to create a "query form" that will allow me to display the results on my screen. I grabbed this code from the net hoping that I could tweak it for my needs. I'm using MySQL, PHP and IIS and they all are running fine. As the code is, it will display the form, but it won't display my result(s). Any suggestions? Cheers,
6
2071
by: B Love | last post by:
I am wondering if I can have a dynamically generated report based upon the results of a query (in Access2000). Any ideas? Related to that (if that cannot be done) can the output of a query generate a set of records in form view. ( The second request sounds even more impossible to the first!) . Thanks for any insight you can share with me! ~Bruce
0
2607
by: Bill Thom | last post by:
I have a Microsoft Access 2000 (9.0.4402 SR-1) database that I am attempting to launch from a hyperlink using Internet Explorer (Version 6.0.2800.1106). If I attempt to launch the database from the webpage with the hyperlink using Netscape, the database opens fine. If I attempt to launch the database from the webpage with the hyperlink using Internet Explorer, the database does not open. When I open Task Manager and check the PROCESS...
2
1863
by: Bishoy George | last post by:
I have a database table with many columns: ItemID , ItemName , ItemLink , ItemSize I want to display items through a datagrid or whatever in the way that the ItemName is written and has the ItemLink as its hyperlink. Any help...
1
13835
by: Frank Milverckowitz | last post by:
Hi, I'm trying to do something common and what should be simple using the GridView "Add Columns" feature in Visual Studio 2005. All I want to do is add a Hyperlink column that will take the user to another aspx page for editing (I'm not using the built in edit feature because I have too many columns)
8
2339
by: kumarboston | last post by:
Hi All, I have a mysql database and 3 pages which queries and returns the data. 1st page(main.html) is just a form in html which takes query from the user and is connected to "form action="index.php"". 2nd page(index.php) has the mysql queries and gives a brief information(one line) about the user query. Now the index.php has a hyperlink to the third page(summary.php) which gives detailed information about the user query. 3rd...
10
1760
by: arial | last post by:
Hi all, I need some help on retrive the value from query string. I have two web forms. One has the datagridview which displays the data from database. On one of the column I made a hyperlink to go to next page like, qi.aspx?qi_track={0} and now I need to open a detail of this qi_track on second page. how can I extract the value of qitrack from the url.
5
11152
by: Sobin Thomas | last post by:
Hi All, I want to pass a string that contains many special characters (: \ . _ etc) to another page in my website through query string. In my project I have a Gridview control ,in which there is a hyperlink field.The Gridview 's datasource is set as a database table at runtime.The hyperlink filed's DataNavigateUrlFields is set to "RecordID" ,which is a field in my database table.The RecordID field contains many special characters.I...
4
372
by: paulmitchell507 | last post by:
I am using Access 2000 and I would like to update a field using an update query. Lets call the field that I would like to update !. Table1 also contains a field called ! . I would like to update ! to show the following, "testsmith@virtualworld.net" where smith@virtualworld.net is stored in ! If I enter the following into my updateto query, "test" & I
0
8352
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.