updating a record

Results 1 to 2 of 2

Thread: updating a record

  1. #1
    Kate Guest

    Default updating a record

    I&#039;m having trouble updating a record...<BR><BR>firstly I get the error :<BR>ADODB.Field error &#039;800a0cb3&#039; <BR>The operation requested by the application is not supported by the provider. <BR>/PlantsDB/addSession.asp, line 67 <BR><BR>because the CursorType parameter of my Recordset object is incorrect I think. So I try <BR><BR>Dim adOpenDynamic<BR>adOpenDynamic = 2<BR><BR>then the line that actually opens the recordset is <BR>objToggle.Open strQuery, objConn3, adOpenDynamic<BR><BR>but now I get the error :<BR>Name redefined <BR>/PlantsDB/addSession.asp, line 32 <BR>Dim adOpenDynamic<BR>----^<BR><BR>it doesn&#039;t like me to redefine &#039;adOpenDynamic&#039; Any ideas ?<BR><BR>Here&#039;s the code for the connection and stuff :<BR><BR>Dim objConn3<BR>Set objConn3 = Server.CreateObject("ADODB.Connection")<BR>objConn 3.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ=D:InetpubPlantsDBPlantsDB.mdb"<BR> objconn3.Open <BR><BR>strQuery= "SELECT * FROM data WHERE data.current=&#039;" & strName & "&#039;;"<BR><BR>Dim adOpenDynamic<BR>adOpenDynamic = 2<BR><BR>Dim objToggle<BR>Set objToggle = Server.CreateObject("ADODB.Recordset")<BR>objToggl e.Open strQuery, objConn3, adOpenDynamic<BR><BR><BR>Thanks in advance,<BR><BR>Kate

  2. #2
    Join Date
    Dec 1969

    Default RE: updating a record

    adOpenDynamic (which, IMO, you shouldn&#039;t be using anyway) is defined in adovbs.inc. That&#039;s why you&#039;re getting the redefinition error. I&#039;d suggest opening the recordset like this<BR><BR>objToggle.Open strQuery, objConn3, 3, 3, 1 &#039;static cursor<BR>objToggle.Open strQuery, objConn3, 1, 3, 1 &#039;keyset cursor<BR><BR>Use the first one for a client side cursor and the second one for a server side cursor.

Posting Permissions

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