Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    errore nell'INSERT INTO

    salve,
    ricevo questo errore:
    "ADODB.Connection error '800a0e78'

    Operation is not allowed when the object is closed."

    nella parte della clausola "else" quando eseguo questa pagina:
    codice:
    <%@LANGUAGE = JScript%>
    <%
    var strgruppo = new String(Request.Form("gruppo"));
    
    var Rs = new ActiveXObject("ADODB.Connection");
    var Rs1 = new ActiveXObject("ADODB.Connection");
    var Cn = new ActiveXObject("ADODB.Connection");
    
    Cn.Open("PROVIDER=Microsoft.Jet.OLEDB.4.0; DATA SOURCE=" + Server.MapPath("/public/europa.mdb"));	
    
    var Sql = "SELECT * FROM bands WHERE nomeband='"+ strgruppo +"'";
    
    Rs=Cn.execute(Sql);
    
     if (!Rs.EOF)
     { 
     Response.Redirect("errore.asp?id=9");
     }
     else{
     Rs1.Open("bands",Cn,3,3);
    	Rs1.AddNew();
    	
    		Rs("nomeband") = strgruppo;
    
    	Rs1.Update();
     
    var idscelto = Rs1("ID");
    
    Rs.Close();
    Rs1.Close();
    
    Response.Redirect("subscribe_band_2.asp?ID="+ idscelto);
    
    }
    
    Cn.Close();
    %>
    qualcuno ha suggerimenti? grazie!

  2. #2
    Utente di HTML.it L'avatar di Gioba66
    Registrato dal
    Jun 2002
    Messaggi
    2,189
    forse Rs e RS1 vanno messi recordset e non connection
    Tutti vogliono parlare, nessuno sa ascoltare.

  3. #3
    il fatto è che il primo RS funziona, il secondo RS1 no...

  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    codice:
    var Rs = new ActiveXObject("ADODB.Recordset");
    var Rs1 = new ActiveXObject("ADODB.Recordset");
    Roby

  5. #5
    codice:
    ADODB.Recordset error '800a0cb3' 
    
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    il provider è aruba.it

  6. #6
    trovato l'errore, mi ero dimenticato un Rs1 al posto di Rs...sviste ;-)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.