Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    708

    Codice spese spedizione

    Ciao

    potreste cortesemente vedere il codice sotto?

    Mi da questo errore:

    Microsoft VBScript runtime error '800a01a8'

    Object required

    /shop2007/carrello.asp, line 316

    e la riga dell'errore è questa:

    Set RSQtOrdine = Conn.Execute(SQLOrdine)

    ----------------------------------------------------------------------------------------
    <form method="post" action="carrello.asp">
    Raccomandata <input type="radio" name="raccomandata" value="1" />

    Celere3 <input type="radio" name="celere3" value="1" />

    Celere1 <input type="radio" name="celere1" value="1" />

    <input type="submit" value="Calcola spese" />
    </form>
    <%

    Dim raccomandataRq, celere3Rq, celere1Rq, SpeseSpedizioneP, SpeseCelere3P, SpeseCelere1P, SpeseQuantitaP, RSQtOrdine, totQt, SpeseSpedizioneC

    raccomandataRq = request.form("raccomandata")
    if isNumeric(raccomandataRq) then raccomandataRq = cLng(raccomandataRq) end if
    if raccomandataRq = 1 then

    SQLProdotti = " SELECT TOP 1 Prodotto, SpeseSpedizione, SpeseQuantita, SpeseCelere3, SpeseCelere1 FROM Prodotti WHERE Prodotto IN (SELECT Prodotto FROM Carrello WHERE IDSessione = '"& SessionID &"') ORDER BY SpeseSpedizione DESC"

    Set RSProdotti = Conn.Execute(SQLProdotti)

    Do While Not RSProdotti.EOF
    Response.Write RSProdotti("Prodotto")
    Response.Write RSProdotti("SpeseSpedizione")
    Response.Write RSProdotti("SpeseQuantita")
    Response.Write RSProdotti("SpeseCelere3")
    Response.Write RSProdotti("SpeseCelere1")

    SpeseQuantitaP = RSProdotti("SpeseQuantita")
    SpeseSpedizioneP = RSProdotti("SpeseSpedizione")
    SpeseCelere3P = RSProdotti("SpeseCelere3")
    SpeseCelere1P = RSProdotti("SpeseCelere1")

    Response.Write SpeseSpedizioneP
    Response.Write SpeseCelere3P
    Response.Write SpeseCelere1P

    RSProdotti.MoveNext
    Loop

    RSProdotti.close
    set RSProdotti=nothing
    conn.close
    set conn=nothing

    SQLOrdine = " SELECT Prodotto, Quantita FROM Carrello WHERE IDSessione = '"& SessionID &"' "
    Set RSQtOrdine = Conn.Execute(SQLOrdine)
    Do While Not RSQtOrdine.EOF
    Response.Write RSQtOrdine("Quantita")
    Response.Write RSQtOrdine("Prodotto")
    totQt = totQt + RSQtOrdine("Quantita")
    Response.Write totQt
    RSQtOrdine.MoveNext
    Loop
    'Set Conn.End
    RSQtOrdine.close
    set RSQtOrdine=nothing
    conn.close
    set conn=nothing

    Response.Write "pluto"
    Response.Write SpeseSpedizioneP
    Response.Write SpeseQuantitaP
    Response.Write totQt

    SpeseSpedizioneC = cLng(SpeseSpedizioneP) + (cLng(totQt) * cLng(SpeseQuantitaP)) '----modifica da verificare

    if cLng(SpeseSpedizione) < cLng(SpeseCelere3P) then
    SpeseSpedizione = cLng(SpeseSpedizioneC)
    end if


    if cLng(SpeseSpedizione) > cLng(SpeseCelere3P) and cLng(SpeseSpedizione) < cLng(SpeseCelere1P) then
    SpeseSpedizione = cLng(SpeseCelere3P)
    end if

    if cLng(SpeseSpedizione) > cLng(SpeseCelere3P) then
    SpeseSpedizione = cLng(SpeseCelere1P)
    end if


    Response.Write SpeseSpedizione
    end if

    celere3Rq = request.form("celere3Rq")
    if isNumeric(celere3Rq) then celere3Rq = cLng(celere3Rq) end if
    if celere3Rq = 1 then

    SpeseSpedizione = cLng(SpeseCelere3P)

    Response.Write SpeseSpedizione
    end if

    Celere1Rq = request.form("Celere1")
    if isNumeric(celere1Rq) then celere1Rq = cLng(celere1Rq) end if
    if celere1Rq = 1 then

    SpeseSpedizione = cLng(SpeseCelere1P)

    Response.Write SpeseSpedizione
    end if
    %>
    ---------------------------------------------------------------------------------
    Pier

  2. #2
    Manca il punto in cui crei l'oggetto ADODB.Connection e dove apri la connessione con il database

    I copia e incolla non funzionano sempre . . .anzi . . .

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.