Error #3704 when updating an Access 97 table

Results 1 to 3 of 3

Thread: Error #3704 when updating an Access 97 table

  1. #1
    Brian Reed Guest

    Default Error #3704 when updating an Access 97 table

    This is driving me insane! I can read data from a table just fine but when I try to post an update, I keep getting this error, even though the recordset object is definitely open. <BR><BR>Error #3704: The operation requested by the application is not allowed if the object is closed.<BR><BR>I&#039m running PWS on NT4. Here&#039s the code I&#039m using:<BR>===============================<BR><BR>D im NewConnect, UpdatePartner<BR><BR>On Error Resume Next<BR><BR>Set NewConnect = Server.CreateObject("ADODB.Connection")<BR>NewConn ect.Open "Account_Review"<BR><BR>Set UpdatePartner = Server.CreateObject("ADODB.Recordset")<BR>UpdatePa rtner.Open _<BR> "SELECT * FROM PartnerInfo where PartnerID =" & Request("PartnerID"),_<BR> NewConnect,adOpenDynamic,adLockOptimistic<BR>Updat ePartner("MktPosition") = Request("MktPosition")<BR>UpdatePartner("MktObject iv1") = Request("MktObjectiv1")<BR>UpdatePartner("MktObjec tiv2") = Request("MktObjectiv2")<BR>UpdatePartner("MktObjec tiv3") = Request("MktObjectiv3")<BR>UpdatePartner("OpsObjec tiv1") = Request("OpsObjectiv1")<BR>UpdatePartner("OpsObjec tiv2") = Request("OpsObjectiv2")<BR>UpdatePartner("OpsObjec tiv3") = Request("OpsObjectiv3")<BR>UpdatePartner("Challeng es") = Request("Challenges")<BR>UpdatePartner.Update<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Error #3704 when updating an Access 97 table

    I am not 100% sure you can open a SQL statement, and then try to do the update. What I would do is.<BR><BR>Set UpdatePartner = Server.CreateObject("ADODB.Recordset")<BR>UpdatePa rtner.Open _<BR>"UPDATE PartnerInfo SET (MktPosition, MktObjectiv1, MktObjectiv2, MktObjectiv3, OpsObjectiv1, OpsObjectiv2, OpsObjectiv3, Challenges) = (&#039" & Request("MktPosition") & "&#039, &#039" & Request("MktObjectiv1") & "&#039, &#039" ... WHERE PartnerID = &#039" & Request("PartnerID") & "&#039"<BR><BR>HTH<BR><BR>Jerry<BR><BR><BR>whe re PartnerID =" & Request("PartnerID"),_<BR>NewConnect,adOpenDynamic ,adLockOptimistic<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Error #3704 when updating an Access 97 table

    Nope, that didn&#039t work either. It just insists that either the NewConnect or UpdatePartner objects are closed.<BR><BR>I&#039ve tried the identical operation on another database and it works fine.<BR><BR>The only way I can clear this is to re-create my partner database from scratch, but the problem pops up again as soon as I start adding more tables.<BR><BR>It&#039s this kind of weird stuff that stimulates sales of recreational drugs.

Posting Permissions

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