473,395 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Need urgent help in solving this recordset error

Let's say I haf 3 project that I wan to list, each project should have 1 value assign to it, but if i remove 1 of the value for 1 of the project, and i tried to list all 3 projects, I get this error:
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

This is my code:
Expand|Select|Wrap|Line Numbers
  1. <%
  2.     call OpenDB()
  3.  
  4.     set rs = Server.CreateObject("ADODB.recordset")
  5.     sql="SELECT * FROM project ORDER BY id"
  6.     rs.Open sql, dbConn
  7.  
  8.     Set li = Server.CreateObject("ADODB.Recordset")
  9.     licheck= "SELECT * FROM usergroup WHERE gpname='"& Request.Cookies("UsernameCookie") &"'" 
  10.     li.Open licheck, dbConn
  11.  
  12.     Set lili = Server.CreateObject("ADODB.Recordset")
  13.     licheckproj= "SELECT * FROM project WHERE id="&li("projectid")&"" 
  14.     lili.Open licheckproj, dbConn
  15.  
  16.     If Request.Cookies("UsernameCookie")="" then
  17.     Response.Write("<center>Please Login to check the current project that you are registered with!</center><br>")
  18.  
  19.     do while not rs.EOF 
  20.  
  21.     Response.Write("<div class=""post"">")
  22.     Response.Write("<h2 class=""title""><span>"&rs("pjname")&"</span></h2>")
  23.     Response.Write("<div class=""story"">")
  24.     Response.Write("<table width=""80%""><td>"&rs("pjdesc")&"</td></table>")
  25.     Response.Write("<div class=""meta"">")
  26.     Response.Write("</div>")
  27.     Response.Write("</div>")
  28.     Response.Write("</div>")
  29.  
  30.     rs.MoveNext
  31.     loop
  32.     rs.close
  33.     set rs = nothing
  34.  
  35.     elseif not Request.Cookies("UsernameCookie")="" and Request.Cookies("priv") = "1" then
  36.     Response.Write("<font color=red size=""2""><b>Welcome<font color=black size=""3""> "&li("gpname")&"</font>, you are currently registered under <font color=black size=""3"">"&lili("pjname")&"</font> <br>For more information about your project, click <a href=""index.asp?p=loginprojstatus"">here</a>.<br>To make changes to your group, click <a href=""index.asp?p=changeproject"">here</a>. </b></font></br>")
  37.  
  38.     set rss = Server.CreateObject("ADODB.recordset")
  39.     students="SELECT COUNT(gpname) AS countproject FROM usergroup Where classid = "&li("classid")&" GROUP BY projectid"
  40.     rss.Open students, dbConn
  41.  
  42.     set rsss = Server.CreateObject("ADODB.recordset")
  43.     studentss = "SELECT * from class WHERE "&li("classid")&" = id"
  44.     rsss.Open studentss,dbConn
  45.  
  46.     do while not rs.EOF
  47.  
  48.     Response.Write("<div class=""post"">")
  49.     Response.Write("<h2 class=""title""><span>"&rs("pjname")&"</span></h2>")
  50.     Response.Write("<div class=""story"">")
  51.     Response.Write("<table width=""80%""><td>"&rs("pjdesc")&"</td></table>")
  52.     Response.Write("<div class=""meta"">")
  53.     Response.Write("</div>")
  54.     Response.Write("</div>")
  55.     if not (rss.EOF or rss.BOF) then 
  56.     Response.Write("<br><table width=""80%""><td>Number of Registered Groups from "&rsss("classes")&" : "&rss("countproject")&"</td>    </table>")
  57.     Response.Write("</div>")
  58.     else 
  59.     Response.Write("<br><table width=""80%""><td>Number of Registered Groups from "&rsss("classes")&" : 0</td>    </table>")
  60.     Response.Write("</div>")
  61.     end if
  62.     rss.MoveNext
  63.     rs.MoveNext
  64.     loop
  65.     rss.close
  66.     set rss = nothing
  67.     rs.close
  68.     set rs = nothing
  69.  
  70.  
  71.     else 
  72.  
  73.     Response.Write("<font color=red size=""2""><b>Welcome "&li("gpname")&", <br>You are currently administrator</font></b></br>")
  74.  
  75.     do while not rs.EOF 
  76.  
  77.     Response.Write("<div class=""post"">")
  78.     Response.Write("<h2 class=""title""><span>"&rs("pjname")&"</span></h2>")
  79.     Response.Write("<div class=""story"">")
  80.     Response.Write("<table width=""80%""><td>"&rs("pjdesc")&"</td></table>")
  81.     Response.Write("<div class=""meta"">")
  82.     Response.Write("</div>")
  83.     Response.Write("</div>")
  84.     Response.Write("</div>")
  85.  
  86.     rs.MoveNext
  87.     loop
  88.     rs.close
  89.     set rs = nothing
  90.  
  91.     end if
  92.  
  93. %>
Jan 1 '08 #1
1 1179
Nvm...I have solve that stupid error...
Jan 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Catherine Jones | last post by:
Hi all we are getting active x component can not create object (Error No. 16) while creating an instance of File System Object in ASP client side script. Could you plz help us in solving this...
2
by: WantedToBeDBA | last post by:
Hi all, We have db2 installed on AIX box (db2 version - 8.1). Its started and i am able to view 50000(default port) in netstat(netstat -a -n). But when i try to connect using telnet, i am getting...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
2
by: kalikoi | last post by:
Hi All when i execute the following code i'm getting the error **************************************************************************** Content-type: text/html Software error: Malformed...
5
by: mail | last post by:
Urgent help needed! I moved an application from ASP+ACCESS to ASP+MS SQLSERVER and I have the following problem: If the join on two tables results on duplicate colum names (which appear in...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
4
by: musai | last post by:
I have created vb oracle application I installed oracle client in three machine. All machine was reconfigured after oracle installed I could see table and record set through sql plus sheet in...
3
by: dotnetdev1 | last post by:
Hi Friends, Wen I am rying to run my asp application....i am ending up with this following error... Error Type: ADODB.Recordset (0x800A0CC1) Item cannot be found in the...
3
by: jats | last post by:
I am a .NET programmer and i had recently got a web application designed in Classic ASP, to make some modifications. When i run the application and try to create a new user the following error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.