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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP / Access Database question

Status
Not open for further replies.

hallm

Programmer
Jun 11, 2000
159
US
I'm new to ASP but I've worked with MS Access for about two years now.&nbsp;&nbsp;I've got a database that I'm trying to implement for the web.&nbsp;&nbsp;I administer an online news site where the content is constantly changing.&nbsp;&nbsp;I've created a page that will list the header information for the newest stories from the database.&nbsp;&nbsp;I need to design a reader asp program to actually display the stories when they are clicked on.&nbsp;&nbsp;I can add the link urls to my list page for each item.&nbsp;&nbsp;For example &quot;&lt;a href = &quot;<A HREF=" TARGET="_new"> is story # 1&gt;&lt;/a&gt;&quot;<br>But how can I take that index value and display only the story I want?
 
the querystring should have key-value pairs so the link should probably be:<br><A HREF=" TARGET="_new"> in reader.asp open a connection and select the story with your id. Try something like:<br><br>&lt;% set db = server.createObject(&quot;ADODB.connection&quot;)<br>db.open &quot;yerDatabase&quot;<br>set story = db.execute(&quot;SELECT * FROM stories WHERE storyID=&quot;&request(&quot;storyID&quot;))<br>response.write(story(&quot;title&quot;)&&quot;&lt;br&gt;&quot;&story(&quot;body&quot;)) %&gt;<br><br>good luck! <p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br>
 
Thank you very much both of your comments were very helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top