ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 21st, 2003, 03:39 PM
blodefood blodefood is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 37 blodefood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 15 sec
Reputation Power: 5
Question passing a parameter?

I am trying to display database records in an ASP page with table structures.

Based on a link such as these on one ASP page
http://.../JobDescription.asp?JobDe...ST%20DEPARTMENT
http://.../JobDescription.asp?JobDe...ST%20DEPARTMENT
I would like to pull a single job description record at a time from a database with three fields.

Our programmer suggested that while my links on the list page were good, the page recieving the data, JobDescription.asp, was missing a parameter or something.

Right now, no matter what link is pressed, only the first record shows.

Here's my code. Help is always apprecated.
___________
<%@ Language=VBScript %>
<HTML>
<BODY>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("jobdesc.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM jobdescmain"
rs.Open sql, conn
%>

<table width="700" border="1" cellspacing="4" cellpadding="4" bordercolor="#007A62">
<tr>
<td width="200" valign="top" bgcolor="#F5DE92">
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><%response.write rs.Fields("JobDescName").Value%></b><br><br>
<hr width="195" align="center" color="#CC6319"><b>
General Duties:</b><br>
<br>
<%response.write rs.Fields("GenDuties").Value%>
<hr width="195" align="center" color="#CC6319"></font></td>
<td width="500" valign="top" bgcolor="#F8F5D4"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Primary
Duties:<br></b>
<br><%response.write rs.Fields("PrimeDuties").Value%><br>

</font></td>
</tr>
</table>

<%
rs.close
conn.close
%>

</BODY>
</HTML>

Reply With Quote
  #2  
Old October 21st, 2003, 03:41 PM
blodefood blodefood is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 37 blodefood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 15 sec
Reputation Power: 5
My links wer truncated.
Hope this works.

http:// . . . /
JobDescription.asp?JobDescName=TEST%20-%20TEST%20DEPARTMENT

Reply With Quote
  #3  
Old October 22nd, 2003, 11:22 AM
blodefood blodefood is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 37 blodefood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 15 sec
Reputation Power: 5
Well, I found it myself. Thanks everyone!

JobDescName=Request.QueryString("JobDescName")
sql = "SELECT * FROM jobdescmain WHERE JobDescName = '" & JobDescName & "';"


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > passing a parameter?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway