473,385 Members | 1,630 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,385 software developers and data experts.

Retrieving one record

Hello, I have a database which I pull a list of id's, housingid's, addresses, area, details, etc..
I would like the user to be able to click on one row and have a page popup with even more information from the same database. I'm not sure how to select the one row that the user clicks on and how to write an asp page to pop up. Also do I make a SELECT statement based on the housingid column?
Any input would be of great help.
Aug 25 '08 #1
8 1210
jhardman
3,406 Expert 2GB
Hello, I have a database which I pull a list of id's, housingid's, addresses, area, details, etc..
I would like the user to be able to click on one row and have a page popup with even more information from the same database. I'm not sure how to select the one row that the user clicks on and how to write an asp page to pop up. Also do I make a SELECT statement based on the housingid column?
Any input would be of great help.
First just make a asp page that opens that information, you can worry about opening it as a popup later.


Yes, I would make the select statement based on the the housingid column, I would send the housing ID to the details page in the URL like this: <a href="details.asp?housingid=123" target="_new">
And the select statement might look like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM myTable WHERE housingid = " & request.querystring("housingid")
Does this help?

Jared
Aug 26 '08 #2
Yes this helps alot thank you so much
Aug 26 '08 #3
I'm trying to use your advice and put the link to the next page in the first page here's what I've come up with, but it's not showing the link:

Response.Write("<td align=right>" & oRS("Details").Value & "<a href='HousingDetails.asp?HousingID=housingID'targe t='_new'> </td>")
Aug 26 '08 #4
Actually I forgot about the </a> part of the statement sorry here's what I have now:

Response.Write("<td align=right>" & oRS("Details").Value & "<a href='HousingDetails.asp?HousingID=housingID'targe t='_new'> Description </a></td>")
Aug 26 '08 #5
Hi Jared,

I can not get the housingID to pass to the second page. My first page is also in Asp so the code I gave above is for that page and

sSQL = "SELECT * FROM TblHousing WHERE HousingID = " & request.querystring("housingID") & ""

Set oRS = oConn.Execute(sSQL)

is what I have on the second page

So when I run it nothing happens so I changed it to inorder to get it to run anything:
sSQL = "SELECT * FROM TblHousing WHERE HousingID = '26'"

and I'm getting the following error:

ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Aug 26 '08 #6
Okay I fixed the passing a parameter and there's no EOF error message anymore, however I don't know how to pass a temp value which is temp = temp = oRS("HousingID").Value through the first page to the second.. My ASP knowledge is very limited
Aug 26 '08 #7
Here's the solution:
Response.Write("<td align=right>" & oRS("Details").Value & "<a href='HousingDetails.asp?housingid=" & oRS("HousingID").Value &"'target='_new'> Description </a></td>")
Aug 26 '08 #8
jhardman
3,406 Expert 2GB
Good job! Are you able to show the right record from the db yet?

Jared
Aug 26 '08 #9

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

Similar topics

4
by: Justin | last post by:
Using SQL server and VS.NET with ASP.NET/C# how can I retrieve the Key ID of a record right after creating that record in the same event? Do I need to close and reopen the connection and requery? ...
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
6
by: Duderino82 | last post by:
I was wondering if there is a way to collect the names of the fields from a specific table. I think the soluction is to be researched in the sql code but maybe someone knows of a way to o so...
10
by: Bhavna | last post by:
I am using a Replace function to replace single quotes with double when submitting a text field in the database i.e. Replace (q, "'", "' ' ") which works fine. When I retrieve the field from the...
11
by: Nemisis | last post by:
Hi everyone, sorry if this post gets really long, i just wanna make sure i fully explain what i am trying to do. I am new to OOP and .net 2.0, so if this is obvious, i am sorry. I have wrote a...
7
by: rfinch | last post by:
Very new to this but using the MS working with dynamics CRM 3.0 book to run web application to retrieve lead records from CRM 3.0. Have followed the book instructions on page 380-382. But am...
15
by: gunnar.sigurjonsson | last post by:
I´m having some problem retrieving identity value from my newly inserted row into a view. I have two tables T1 and T2 which I define as following CREATE TABLE T1 ( id BIGINT GENERATED ALWAYS...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.