Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di asch
    Registrato dal
    Aug 2002
    Messaggi
    365

    Aiuto x Microsoft JET Database Engine error

    Mi sapete indicare come posso ovviare a questo errore che mi capita ogni tanto?

    Microsoft JET Database Engine error '80040e21'

    The Microsoft Jet database engine stopped the process because you and another user are attempting to change the same data at the same time.

    /banners/rotazione.asp, line 32

    codice:
    sql = "SELECT * FROM banner WHERE attivo= " & 1 & " ;"
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, Conn, 3, 3
    
    If rs.EOF or rs.BOF Then
    '
    Else
    rs.MoveFirst
    rs("esposizioni") = rs("esposizioni") + 1
    rs.Update ' RIGA DI ERRORE
    End If
    ...............
    :::::ILNY::::::
    °°°°°°°°°°°°°°°

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Se invece fai così:
    codice:
    sql = "UPDATE banner SET esposizioni = esposizioni + 1 WHERE attivo= " & 1 & " ;"
    Conn.Execute(sql)
    A parte il fatto che la condizione non mi è chiara...

    Roby

  3. #3
    Utente di HTML.it L'avatar di asch
    Registrato dal
    Aug 2002
    Messaggi
    365
    avevo semplificato, ecco il tutti:
    codice:
    <%
    sql = "SELECT * FROM banner WHERE attivo= " & 1 & " ORDER BY parametro"
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, Conn, 3, 3
    
    If rs.EOF or rs.BOF Then
    Banner = strLinkSito & CartellaBannerImg & "bassanonline468x60.gif"
    Link = "http://www.bassanonline.it"
    Else
    rs.MoveFirst
    
    Banner = strLinkSito & CartellaBannerImg & rs("link_banner")
    Link = strLinkSito & CartellaBanner & "click.asp?Id=" & rs("id")
    rs("esposizioni") = rs("esposizioni") + 1
    rs("parametro") = rs("parametro") + 1
    rs.Update
    End If
    
    rs.Close
    set rs = Nothing
    Conn.Close
    Set Conn = Nothing
    %>
    ...............
    :::::ILNY::::::
    °°°°°°°°°°°°°°°

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.