Record Set Problem

cosuroca

New Member
This is an old ASP file that I am converting to ASP.NET as a test. The file generates a list of job titles. When I run this file I get System._ComObject for each of my job titles. The number of times the System._ComObject appears in the list is the same number of records that should actually be pulled. Any ideas as to why I am not actually pulling the data? I get no errors. Since this is an old ASP file I don't want to start from scratch.<BR><BR>I am using the following code:<BR><BR><%@Import Namespace="System.Data"%><BR><%@Import Namespace="System.Data"%><BR><%@ Page aspcompat=true Language="vb" Debug=true%><BR><%<BR>Dim Conn<BR>Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("test.mdb")<BR>Conn.Open<BR><%<BR>Dim RS = Conn.Execute("SELECT job_title FROM JobInfo where visible = 'yes' order by job_title")<BR>%><BR><BR><html><BR><head><BR><title>Job Listing</title><BR><BR><LINK REL=StyleSheet HREF=http://aspmessageboard.com/archive/index.php/"css/stylesheet.css" TYPE="text/css"><BR><BR></head><BR><BR><body class="body"><BR><BR><div id="job_list_div" style="padding:5px; overflow:auto; position:absolute; left:7; top:5; width:270; height:399;" class="Input"><BR>Job List<BR><BR><select name="job_list" size="10" style="position:absolute; width:265px; height:379px; font-size:8pt;" onchange="job_title = this.value;parent.job_title.selected_job_title.val ue=job_title"><BR><BR><%<BR>do while not rs.eof<BR>dim job_title = rs("job_title")<BR>%><BR><option value="<%=job_title%>"><%=job_title%></option><BR><%<BR>rs.movenext<BR>loop<BR>%><BR></select><BR></div><BR><BR><BR></body><BR><BR></html><BR><%<BR>RS.close<BR>Conn.close<BR>RS = Nothing<BR>Conn = Nothing<BR>%>I found my soultion. Here is the code if anyone cares to view it:<BR><BR><%@Import Namespace="System.Data"%><BR><%@Import Namespace="System.Data"%><BR><%@ Page aspcompat=true Language="vb" Debug=true%><BR><%<BR>Dim Conn<BR>Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("test.mdb")<BR>Conn.Open<BR> Response.Buffer = True<BR> Response.Expires = 0<BR> Response.CacheControl = "no-cache"<BR>%><BR><%<BR>Dim RS = Conn.Execute("SELECT job_title FROM JobInfo where visible = 'yes' order by job_title")<BR>%><BR><BR><html><BR><head><BR><title>Job Listing</title><BR><BR><LINK REL=StyleSheet HREF="css/stylesheet.css" TYPE="text/css"><BR><BR></head><BR><BR><body class="body"><BR><BR><div id="job_list_div" style="padding:5px; overflow:auto; position:absolute; left:7; top:5; width:270; height:399;" class="Input"><BR>Job List<BR><BR><select name="job_list" size="10" style="position:absolute; width:265px; height:379px; font-size:8pt;" onchange="job_title = this.value;parent.job_title.selected_job_title.val ue=job_title"><BR><BR><%<BR>Dim objField = RS("job_title")<BR>do while not rs.eof<BR>dim job_title = objField.value<BR>%><BR><option value="<%=job_title%>"><%=job_title%></option><BR><%<BR>rs.movenext<BR>loop<BR>%><BR></select><BR></div><BR><BR></body><BR><BR></html><BR><%<BR>RS.close<BR>Conn.close<BR>RS = Nothing<BR>Conn = Nothing<BR>%>
 
Back
Top