Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Beginner in asp


Message #1 by "Eric" <eric.chaput@s...> on Thu, 18 Apr 2002 11:13:59 -0400
This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C1E6CA.237AD7C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

    I'm a beginner in asp, i have a problem when i want to delete a 
recordset.  This is my code
    And if i don't delete the recordset then i have another error on my 
page.

    This is the error message:
    
    ADODB.Recordset error '800a0cb3'
    Object or provider is not capable of performing requested operation. 


    /acm/test.asp, line 46

 my code

  IF Request( "updateQ" ) <> "" THEN
  SET RS =3D Server.CreateObject( "ADODB.Recordset" )
  RS.ActiveConnection =3D Con
  RS.CursorLocation =3D 3
  RS.CursorType =3D adOpenDynamic
 
  Sql =3D "SELECT cart_id, cart_quantity FROM cart " &_
    "WHERE cart_userID=3D" & userID
  SET RS =3D Con.Execute( Sql )
  WHILE NOT RS.EOF
  newQ =3D TRIM( Request( "pq" & RS( "cart_id" ) ) )
  deleteProduct =3D TRIM( Request( "pd" & RS( "cart_id" ) ) )
  IF newQ =3D "" OR newQ =3D "0" OR deleteProduct <> "" THEN
    RS.Delete                                                 <--    
it's my first problem
  ELSE
    IF isNumeric( newQ ) THEN
      RS( "cart_quantity" ) =3D newQ                    <-- second 
problem if i don't delete the recordset
     
    END IF
  END IF
  RS.MoveNext
  WEND
  RS.Close
  SET RS =3D Nothing
  END IF



  Return to Index