Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display one particular record

Status
Not open for further replies.

ola123

Technical User
Sep 16, 2005
52
0
0
JM
hello there,

here is the problem.
I have created some asp pages and linked it to a database. but what i want to know how to do is display ONE record.

Say for example i type the id of a record and click find, it should locate and display only that particular record.

if there is someone who could let me know how to do that i would greatly appreciate it.

thanks in advance
a working example, some line of codes or tutorials would be nice.

thanks again
B2DB

 
google asp.net data access for a numerous examples. there a many ways to do this. there are some drag/drop controls which are quick to implement, but can be a pain to maintain over multiple revisions.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
jmeckley

if i was getting that results that i needed from a google search i wouldn't be asking help from the forum.
u think
 
Simple.

Just edit your SELECT statement in your GridView and add a WHERE clause.

Example:
"SELECT ID, First_Name FROM Employees WHERE ID = 19"

This SQL statement only gives you one record based on the ID inputted in the WHERE clause.

Here is a useful resource:
I hope this helps...

- Thamer
 
ola123,

There are plenty of people that do not consult Google before posting here. We can't assume that you do. Don't be rude to someone being helpful. He doesn't even have to respond to you, but he did.
 
jmeckley

if i was getting that results that i needed from a google search i wouldn't be asking help from the forum.
u think
Your original post refers to asp, not ASP.NET so firstly you are in the wrong forum. The ASP forum is forum333

Secondly, your original post doesn't demonstrate that you have done any research at all prior to posting so jmeckley is entirely correct in his response directing you to do some research. If you have actually done some, you should post exactly what you have tried and why it doesn't work for you as we can't make a guess at what this is.

Thirdly, if you want to get any future help from these forums I suggest that you be more polite to those people who do respond to you.

And finally, I notice that although you have asked around 20 questions on the forums here, and been a member for 2 years, you have only marked 1 of the answers as valuable, and I can only see one or two acknowledgements of other peoples responses. If you are not getting the answers that you need read FAQ222-2244 to see how to ask better questions. If you are getting the answers you need see FAQ222-2244 to see how to acknowledge the answers given.

Paragraph 16 of the FAQ explains about this being a two-way forum, to give guidance on answering other peoples questions, as I also notice that you haven't yet made any posts in other peoples threads.




------------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
 
I do humbly apologise for that resopnse, its just sometime when you in a hurry to get something done its frustrating when you dont get the answers you deisre.

I do appreciate jmeckely response and i accept the fact that i may have structured my question incorrect so let me try that again.

What i require to do is the same as above and what i'v tried was the same thing that tyt2000 suggested but that would leave me with the same information being displayed all the and i would like (for e.g. ID to be dynamic) that 'variable' to change at the request of the user without going into the code.

I had downloaded a site msconline.maconstate.edu\tutorials\ASPNET20\default.htm
and it gave some short info about 'integrating variable data' but it didn't actually show me how to use a variable to display a reacod
 
You could make a dropdown list populated with your ID values and on a selectedindex_changed event repopulate the items you are using to display your data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top