Recordset Error

Results 1 to 2 of 2

Thread: Recordset Error

  1. #1
    Yngvar Guest

    Default Recordset Error

    I get this error message when I try to delete in a Access 97 database<BR><BR>ADODB.Recordset error &#039;800a0c93&#039; <BR>Operation is not allowed in this context. <BR>/admin/Spørreundersøkelser/default.asp, line 140 <BR><BR>The code (line 140 is in bold):<BR>Set rsUndersokelseSporsmal = Server.CreateObject("ADODB.RecordSet")<BR>With rsUndersokelseSporsmal<BR> .Filter = "UndersokelseId = " & intUndersokelseId<BR> .Open "UndersokelseSporsmal", Connection, adOpenDynamic, adLockPessimistic, adCmdTableDirect<BR> If Not .EOF And Not .BOF Then<BR> arrUndersokelseSporsmal = .GetRows<BR> &#060;b&#062;.Delete adAffectGroup&#060;/b&#062;<BR> End If<BR> .Filter = ""<BR> .Close<BR>End With

  2. #2
    Join Date
    Dec 1969

    Default RE: Recordset Error

    You need to open the recordset before filtering surely, but if that doesn&#039;t help get rid of the with statment like ;<BR><BR><BR>Set rsUndersokelseSporsmal = Server.CreateObject("ADODB.RecordSet")<BR>rsUnders okelseSporsmal.Open "UndersokelseSporsmal", Connection, adOpenDynamic, adLockPessimistic, adCmdTableDirect<BR>rsUndersokelseSporsmal.Filter = "UndersokelseId = " & intUndersokelseId<BR>If Not rsUndersokelseSporsmal.EOF And Not rsUndersokelseSporsmal.BOF Then<BR>arrUndersokelseSporsmal = rsUndersokelseSporsmal.GetRows<BR>&#060;b&#062;rsU ndersokelseSporsmal.Delete adAffectGroup&#060;/b&#062;<BR>End If<BR>rsUndersokelseSporsmal.Filter = ""<BR>rsUndersokelseSporsmal.Close

Posting Permissions

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