Exception error ?!?

Results 1 to 2 of 2

Thread: Exception error ?!?

  1. #1
    Jason Guest

    Default Exception error ?!?

    Hi <BR><BR>I cant for the life of me figure what is wrong with my Do..Loop While loop below which is giving the error:<BR><BR>I have double checked the access field is "id" and the form field name "ImageID" is correct.<BR><BR>----------Error message--------------<BR>Entering objRS loop1234 error &#039 80020009&#039 <BR>Exception occurred. <BR><BR>/othersites/artcomp/vote.asp, line 35 <BR>-------------------------------------<BR><BR>--------Code snippet-----------------<BR>.<BR>.<BR>.<BR>Dim objConn, objRS, connection, dbPath, newID<BR> dbPath = Server.MapPath("/db/art/subs.mdb")<BR> connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"<BR>&#039connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=/db/art/subs.mdb;"<BR><BR>&#039Set objConn = Server.CreateObject("ADODB.Connection")<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR><BR>&#03 9objConn.Open connection<BR>&#039objRS.Open "subs", connection, adOpenStatic, adLockOptimistic, adCmdTable<BR> objRS.Open "subs", connection, 3, 3, &H0002<BR> <BR> Response.Write "Entering objRS loop"<BR> <BR> Do<BR> Response.Write objRS.Fields("id")<BR> objRS.MoveNext<BR> Loop While (Trim(Request.Form("ImageID"))) &#060;&#062; (objRS.Fields("id")) &#039This is the offending line.<BR><BR> existingVote = CInt(objRS.Fields("voteaverage"))<BR> votecount = objRS.Fields("votetotal") + 1<BR> newVoteScore = (existingVote + ThisVoteAve)/2<BR><BR> objRS("votetotal") = votecount<BR> objRS("voteaverage") = newVoteScore<BR><BR> objRS.Update<BR> objRS.Close<BR> Set objConn = nothing<BR> Set objRS = nothing<BR>.<BR>.<BR>.<BR>--------Code snippet end-------------<BR><BR>Thx<BR>Jason

  2. #2
    Join Date
    Dec 1969

    Default RE: Exception error ?!?

    why not just keep it simple<BR><BR>do while not &#060;condition&#062;<BR><BR>stuff....<BR><BR>objR S.movenext<BR>loop<BR><BR>and that&#039s it?<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts