Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11

Discussione: Delete riga

  1. #1

    Delete riga

    Salve :non mi funziona la pagina delete per eliminare una riga:
    questo e' il codice:
    dove sbaglio?
    grazie:
    <%@ Language=VBScript %>
    <%on error resume next%>
    <HTML>
    <HEAD>
    <title>Delete Data</title>
    </head>
    <body background="Fractal_Lumpy.jpg">
    <%totfieldcount = 0
    qString = ""%>

    <%
    Qvarcodice = request.querystring("codice")
    If Qvarcodice = "ON" then
    QueryCheckString = QueryCheckString & "codice" & "=ON&"
    end if
    varcodice = request.querystring("datcodice")
    varcodice = replace(varcodice, "'", "''")
    ReDim Preserve arrField(totFieldCount)
    arrField(totFieldCount) = "codice"
    if varcodice <> "" then
    if totfieldcount <> 0 then qString = qString & " and"
    qString = qString & " [codice] = '" & varcodice & "'"
    totFieldCount = totFieldCount + 1
    end if
    %>
    <%
    QvarArticolo = request.querystring("Articolo")
    If QvarArticolo = "ON" then
    QueryCheckString = QueryCheckString & "Articolo" & "=ON&"
    end if
    varArticolo = request.querystring("datArticolo")
    varArticolo = replace(varArticolo, "'", "''")
    ReDim Preserve arrField(totFieldCount)
    arrField(totFieldCount) = "Articolo"
    if varArticolo <> "" then
    if totfieldcount <> 0 then qString = qString & " and"
    qString = qString & " [Articolo] = '" & varArticolo & "'"
    totFieldCount = totFieldCount + 1
    end if
    %>
    <%
    Qvarprezzo = request.querystring("prezzo")
    If Qvarprezzo = "ON" then
    QueryCheckString = QueryCheckString & "prezzo" & "=ON&"
    end if
    varprezzo = request.querystring("datprezzo")
    varprezzo = replace(varprezzo, "'", "''")
    ReDim Preserve arrField(totFieldCount)
    arrField(totFieldCount) = "prezzo"
    if varprezzo <> "" then
    if totfieldcount <> 0 then qString = qString & " and"
    qString = qString & " [prezzo] = " & varprezzo
    totFieldCount = totFieldCount + 1
    end if
    %>
    <%if totfieldcount <> 0 then
    Set adoConnection = server.CreateObject("ADODB.Connection")
    Set adoRecordset = server.CreateObject("ADODB.Recordset")
    adoConnection.Provider = "Microsoft.Jet.OLEDB.4.0"
    Dim strLocation, iLength
    strLocation = Request.ServerVariables("PATH_TRANSLATED")
    iLength = Len(strLocation)
    iLength = iLength - 10
    strLocation = Left(strLocation, iLength)
    strLocation = strLocation & "../mdb-database/database.mdb"
    adoConnection.Open ("Data Source=" & strLocation)
    adoRecordset.ActiveConnection = AdoConnection
    if qString <> "" then
    response.write(qstring)
    adoRecordset.open ("delete from [listino] where " & qString)
    response.redirect("getdata.asp?" & mid(QueryCheckString,1,len(QueryCheckString)-1)) & "&NAV=" & request.querystring("NAV")
    else
    response.write("no data specified")
    end if
    end if%>
    </body>
    </html>

  2. #2
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    non è leggibile usa

  3. #3
    ho finito mi manca solo il cancella e la modifica!(((((((((
    qualche aiutino?

  4. #4
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    :master:

  5. #5
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    rixx voleva dire che quando riporti il codice qui nel forum, devi metterlo tra i tag CODE.
    Ma questo scritp l'hai fatto davvero tu?

    Roby

  6. #6

  7. #7

  8. #8
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    Roby magari era un bambino prodigio! vedi avatar


    :maLOL: :maLOL:

  9. #9
    ma potete aiutarmi?per favore

  10. #10
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    sinceramente ti ho già risposto in pvt gli errori sono nella query di aggiornamento, i campi non sono dello stesso tipo di come li aggiorni.
    Ora la query è un miscuglio di pezzi che non ho tempo di controllare dovresti sezionarla con calma per trovare gli errori nell'aggiornamento

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.