Visualizzazione dei risultati da 1 a 7 su 7

Discussione: error '80004005'

  1. #1

    error '80004005'

    Ho un problema. Mi vien dato questo errore:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

    /login.asp, line 149

    il cui relativo codice e':

    var conn = new ActiveXObject("ADODB.Connection");
    conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("login/yhjkaoqpsjk.mdb"));
    var rs = new ActiveXObject("ADODB.Recordset");
    rs.Open("utenti",conn,3,3);
    rs.AddNew();
    rs("nickname") = nickname;
    rs("ip") = String(Request.ServerVariables("REMOTE_ADDR"));
    rs("data") = String(datemp);
    rs.Update();
    rs.Close();
    conn.Close();
    Nella fattispecie l'errore si riferisce alla riga "rs.Update();"

    Chi mi da una mano?

  2. #2
    Sbattendo e risbattendo a caso nel codice, per altro impeccabilmente scritto, mi par che l'errore in se non sia verificato dall'update del RecordSet bensi' dall'accesso al DB "login/yhjkaoqpsjk.mdb".

    A questo punto mi chiedo: sono io la Rapalessa oppure Aruba mi sta prendendo per le terga e mi mancano determinati permessi che fan si che si possa accedere a codesto DB?

  3. #3
    Il codice è giusto, è solo che il database o la cartella in cui si trova il database non ha i permessi in scrittura.
    Se stai lavorando in locale dai i permessi alla cartella, altrimenti metti il database nella cartella "mdb-database" o qualcosa di simile e poi cambia il percorso da:
    codice:
    conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("login/yhjkaoqpsjk.mdb"));
    a
    conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("/mdb-database/yhjkaoqpsjk.mdb"));

  4. #4
    Ho eseguito la modifica consigliata ma il risultato e' un secondo errore:

    Codice PHP:
    Microsoft JScript runtime  error '800a0046'

    Permission denied

    /annotazioni.incline 35 
    Localizzato nel file annotazioni.inc qui di seguito riportato:
    Codice PHP:
    <%

    function 
    leggiNota(id,pt,nomeNota) {
      
    nomeNota nomeNota.toLowerCase();
      var 
    thefile Server.MapPath(pt "login/annotazioni/" id ".asp");
      var 
    sst sfo.OpenTextFile(thefile);
      
    sst.SkipLine();
      while (!
    sst.AtEndOfStream) {
        var 
    auxNota sst.ReadLine();
        var 
    iNota auxNota.indexOf("=");
        if (
    nomeNota==auxNota.substring(0,iNota)) {
          
    sst.Close();
          return 
    auxNota.substring(iNota+1,auxNota.length);
        }
      }
      
    sst.Close();
      return 
    "";
    }

    function 
    scriviNota(id,pt,nomeNota,valNota) {
      
    nomeNota nomeNota.toLowerCase();
      var 
    thefile Server.MapPath(pt "login/annotazioni/" id ".asp");
      var 
    sst sfo.OpenTextFile(thefile);
      var 
    arrNota = new Array();
      var 
    iNota 0;
      while (!
    sst.AtEndOfStreamarrNota[iNota++] = sst.ReadLine();
      
    sst.Close();
      var 
    trovataNota false;
      for (
    iNota=1;!trovataNota && iNota<arrNota.length;iNota++)
        if (
    nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) {
          
    trovataNota true;
          
    arrNota[iNota] = nomeNota "=" valNota;
        }
      if (!
    trovataNotaarrNota[arrNota.length] = nomeNota "=" valNota;
      var 
    sst2 sfo.CreateTextFile(thefile);
      for (
    iNota=0;iNota<arrNota.length;iNota++) sst2.WriteLine(arrNota[iNota]);
      
    sst2.Close();
    }

    function 
    cancellaNota(id,pt,nomeNota) {
      
    nomeNota nomeNota.toLowerCase();
      var 
    thefile Server.MapPath(pt "login/annotazioni/" id ".asp");
      var 
    sst sfo.OpenTextFile(thefile);
      var 
    arrNota = new Array();
      var 
    iNota 0;
      var 
    indiceNota = -1;
      while (!
    sst.AtEndOfStream) {
        
    arrNota[iNota] = sst.ReadLine();
        if (
    nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) indiceNota iNota;
        
    iNota++;
      }
      
    sst.Close();
      var 
    sst2 sfo.CreateTextFile(thefile);
      for (
    iNota=0;iNota<arrNota.length;iNota++)
        if (
    iNota!=indiceNotasst2.WriteLine(arrNota[iNota]);
      
    sst2.Close();  
    }

    %> 
    La cui 35ima riga risulta essere:
    Codice PHP:
      var sst2 sfo.CreateTextFile(thefile); 
    Inizio ad essere confuso. Il codice pare essere corretto...

  5. #5
    Non è sufficiente mettere il db nell'apposita cartella (mdb-database) o public o cgi-bin nel caso di aruba, come ti ha suggerito michele.santoro, ma anche il file che stai cercando di creare con FSO e non SFO.

    Anch'esso necessita dei permessi di scrittura

    codice:
    var sst2 = sfo.CreateTextFile(thefile);

  6. #6
    Altro giro, altra corsa. Il problema, molto probabilmente, sara' simile a quello precedente o proprio uguale, tuttavia non mi sto raccapezzando.
    La cernia sono io, questo e' fuor di dubbio pero'....


    codice:
    Microsoft JScript runtime  error '800a1391'
    
    'fso' is undefined
    
    /mdb-database/annotazioni.inc, line 93
    Il cui codice e' rispettivamente:

    codice:
    <%
    
    function leggiNota(id,pt,nomeNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      sst.SkipLine();
      while (!sst.AtEndOfStream) {
        var auxNota = sst.ReadLine();
        var iNota = auxNota.indexOf("=");
        if (nomeNota==auxNota.substring(0,iNota)) {
          sst.Close();
          return auxNota.substring(iNota+1,auxNota.length);
        }
      }
      sst.Close();
      return "";
    }
    
    function scriviNota(id,pt,nomeNota,valNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      var arrNota = new Array();
      var iNota = 0;
      while (!sst.AtEndOfStream) arrNota[iNota++] = sst.ReadLine();
      sst.Close();
      var trovataNota = false;
      for (iNota=1;!trovataNota && iNota<arrNota.length;iNota++)
        if (nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) {
          trovataNota = true;
          arrNota[iNota] = nomeNota + "=" + valNota;
        }
      if (!trovataNota) arrNota[arrNota.length] = nomeNota + "=" + valNota;
      var sst2 = fso.CreateTextFile(thefile);
      for (iNota=0;iNota<arrNota.length;iNota++) sst2.WriteLine(arrNota[iNota]);
      sst2.Close();
    }
    
    function cancellaNota(id,pt,nomeNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      var arrNota = new Array();
      var iNota = 0;
      var indiceNota = -1;
      while (!sst.AtEndOfStream) {
        arrNota[iNota] = sst.ReadLine();
        if (nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) indiceNota = iNota;
        iNota++;
      }
      sst.Close();
      var sst2 = sfo.CreateTextFile(thefile);
      for (iNota=0;iNota<arrNota.length;iNota++)
        if (iNota!=indiceNota) sst2.WriteLine(arrNota[iNota]);
      sst2.Close();  
    }
    
    %><%
    
    function leggiNota(id,pt,nomeNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      sst.SkipLine();
      while (!sst.AtEndOfStream) {
        var auxNota = sst.ReadLine();
        var iNota = auxNota.indexOf("=");
        if (nomeNota==auxNota.substring(0,iNota)) {
          sst.Close();
          return auxNota.substring(iNota+1,auxNota.length);
        }
      }
      sst.Close();
      return "";
    }
    
    function scriviNota(id,pt,nomeNota,valNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      var arrNota = new Array();
      var iNota = 0;
      while (!sst.AtEndOfStream) arrNota[iNota++] = sst.ReadLine();
      sst.Close();
      var trovataNota = false;
      for (iNota=1;!trovataNota && iNota<arrNota.length;iNota++)
        if (nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) {
          trovataNota = true;
          arrNota[iNota] = nomeNota + "=" + valNota;
        }
      if (!trovataNota) arrNota[arrNota.length] = nomeNota + "=" + valNota;
      var sst2 = fso.CreateTextFile(thefile);
      for (iNota=0;iNota<arrNota.length;iNota++) sst2.WriteLine(arrNota[iNota]);
      sst2.Close();
    }
    
    function cancellaNota(id,pt,nomeNota) {
      nomeNota = nomeNota.toLowerCase();
      var thefile = Server.MapPath(pt + "mdb-database/annotazioni/" + id + ".asp");
      var sst = sfo.OpenTextFile(thefile);
      var arrNota = new Array();
      var iNota = 0;
      var indiceNota = -1;
      while (!sst.AtEndOfStream) {
        arrNota[iNota] = sst.ReadLine();
        if (nomeNota==arrNota[iNota].substring(0,arrNota[iNota].indexOf("="))) indiceNota = iNota;
        iNota++;
      }
      sst.Close();
      var sst2 = sfo.CreateTextFile(thefile);
      for (iNota=0;iNota<arrNota.length;iNota++)
        if (iNota!=indiceNota) sst2.WriteLine(arrNota[iNota]);
      sst2.Close();  
    }
    
    %>
    e la riga 93 invece:

    codice:
    var sst2 = fso.CreateTextFile(thefile);

  7. #7
    a supremo, altro giro altro thread. aprine uno nuovo, pls

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 © 2026 vBulletin Solutions, Inc. All rights reserved.