View Single Post
  #9 (permalink)  
Old 06-16-05, 10:31 PM
koncept
Guest
 
Posts: n/a
wow, i never realized till you just posted your code i have more stuff in mine than is needed...

two main things that i saw. you were setting adocon = to a server object and it didnt need to be. second the strsql came after you tried to open it so that string was blank and it didnt know what to do.

two spruce ups...first i combined your sql statements, second i put the output of the db into the link as you were going to do..
Code:
  <%
 	 Dim strCon
 	 Dim rsGeolink
 	 Dim strSQL
 	 Dim strSQL2	
 	 Set rsGeolink = Server.CreateObject("ADODB.Recordset")
 	 strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("qrm.mdb")
 	 strSQL = "SELECT Dept_ID, Dept_Name FROM Department"
 	  rsGeolink.Open strSQL, strCon
 
 	 Do While not rsGeolink.EOF
 %>
	 <a href="editjob1.asp?dept_id=<%=rsgeolink("dept_id")%>"><%=rsgeolink("dept_name")%></a>
<%
 	   rsGeolink.MoveNext
 	Loop
 	rsGeolink.Close
 	Set rsGeolink = Nothing
 	%>
Reply With Quote