|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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> |
|
#3
|
|||
|
|||
|
Well, I found it myself. Thanks everyone!
JobDescName=Request.QueryString("JobDescName") sql = "SELECT * FROM jobdescmain WHERE JobDescName = '" & JobDescName & "';" ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > passing a parameter? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|