Stellar Blade Un'esclusiva PS5 che sta facendo discutere per l'eccessiva bellezza della protagonista. Vieni a parlarne su Award & Oscar!

...Voci nel Web... Il 21/08/2001 nasce il forum + simpatico del web!!!!

problema ASP

  • Messaggi
  • OFFLINE
    ~=€MM@=~
    Post: 100.930
    Post: 3.493
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 04/05/2006 17:22
    stavo creando un sito in asp, ma ho 2 problemi:
    1. non mi funziona una query di inserimento
    2. non mi funziona la ricerca

    form di iscrizione:

    <html>

    <head>
    <link rel="stylesheet" type="text/css" href="style.css">
    <script language="javascript">
    function verificaCampi(){
    if (document.compila.user.value=="") {
    alert("Il campo username è obbligatorio!");
    return false;
    }
    if (document.compila.pw.value=="") {
    alert("Il campo password è obbligatorio!");
    return false;
    }
    if (document.compila.mail.value=="") {
    alert("Il campo email è obbligatorio!");
    return false;
    }
    else if (document.compila.mail.value.indexOf ('@',0) == -1
    || document.compila.mail.value.indexOf ('.',0) == -1){
    alert("Il campo email deve contenere i caratteri '@' e '.'")


    return false;
    }

    else
    return true;
    }
    </SCRIPT>




    </head>

    <body>


    <form method="POST" action="iscriviti.asp" name=compila onSubmit="return verificaCampi();">

    <table border="0" width="45%">
    <tr>
    <td width="50%">Username*</td>
    <td width="50%"><input type="text" name="user" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Password*</td>
    <td width="50%"><input type="password" name="pw" size="20"></td>
    </tr>
    <tr>
    <td width="50%">E-mail*</td>
    <td width="50%"><input type="text" name="mail" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Nome</td>
    <td width="50%"><input type="text" name="nome" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Cognome</td>
    <td width="50%"><input type="text" name="cognome" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Sesso</td>
    <td width="50%">
    <table align=center border="0" width="80%">
    <tr>
    <td align=center width="50%">M<input type="radio" value="m" name="sex"></td>
    <td align=center width="50%">F<input type="radio" name="sex" value="f"></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="50%">Indirizzo</td>
    <td width="50%"> <table border="0" width="80%">
    <tr>
    <td align=center width="50%"><input type="text" name="via" size=15></td>
    <td align=center width="50%">N°<input type="text" name="nc" size=3></td>
    </tr></table></td>
    </tr>

    <tr>
    <td width="50%">Città</td>
    <td width="50%"><input type="text" name="citta" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Codice Fiscale</td>
    <td width="50%"><input type="text" name="codfisc" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Telefono</td>
    <td width="50%"><input type="text" name="telefono" size="20"></td>
    </tr>

    </table>
    </td>
    </tr>
    </table>

    <p><input type="submit" value="Invia"><input type="reset" value="Cancella tutti i campi" name="reset"></p>
    </form>
    <p>I CAMPI CONTRASSEGNATI DA * SONO OBBLIGATORI</p>

    </body>

    </html>


    iscriviti.asp

    <html>

    <head>
    <title>Index</title>
    </head>
    <!--#include file="db.asp"-->

    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user")&"', utente)"')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>



    cosa c'è di sbagliato? [SM=x40004]


    form di ricerca:

    <html>

    <head>
    <link rel="stylesheet" type="text/css" href="style.css">

    </head>
    <!--#include file="db.asp"-->
    <body>

    <form method="POST" action="cerca.asp">

    <%sql="select DISTINCT tipo FROM articolo"
    set rs=db.execute(sql)%>

    <table border="0">
    <tr>
    <td>Tipologia</td>
    <td><select size="1" name="tipo">
    <option value="Tutte" selected>Qualsiasi tipologia</option>
    <%while not rs.eof%>
    <option value='<%=rs("tipo")%>'> <%=rs("tipo")%> </option>
    <%rs.movenext
    wend%>


    </select></td>
    </tr>

    <%sql="select DISTINCT prezzo FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Prezzo</td>
    <td><input type="text" name="prezzo" size="6"></td>

    </tr>

    </tr>

    <%sql="select DISTINCT colore FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Colore</td>
    <td><select size="1" name="tipo">
    <option value="Tutte" selected>Qualsiasi colore</option>
    <%while not rs.eof%>
    <option value='<%=rs("colore")%>'> <%=rs("colore")%> </option>
    <%rs.movenext
    wend%>



    </select></td>
    </tr>

    <%sql="select DISTINCT taglia FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Taglia</td>
    <td><select size="1" name="tipo">
    <option selected value="Tutte">Qualsiasi taglia</option>
    <%while not rs.eof%>
    <option value='<%=rs("taglia")%>'> <%=rs("taglia")%> </option>
    <%rs.movenext
    wend%>

    </select></td>
    </tr>
    <%sql="select DISTINCT marca FROM articolo"
    set rs=db.execute(sql)%> <tr>
    <td>Marca</td>
    <td><select size="1" name="marca">
    <option selected value="Tutte">Qualsiasi marca</option>
    <%while not rs.eof%>
    <option value='<%=rs("marca")%>'> <%=rs("marca")%> </option>
    <%rs.movenext
    wend%>

    </select></td>
    </tr>


    </table>
    <p><input type="submit" value="Invia" name="invio"><input type="reset" value="Cancella tutti i campi" name="reset"></p>
    </form>

    </body>

    </html>



    cerca.asp:

    <html>
    <head>
    <title>Index</title>


    <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <!--#include file="db.asp"-->
    <body>
    <%
    if request.form("tipo") = "Tutte" then
    tipo = "%"
    else
    tipo = request.form("tipo")
    End if
    %>
    <%
    if request.form("prezzo") = "" then
    prezzo = "%"
    else
    prezzo = request.form("prezzo")
    End if
    %>
    <%
    if request.form("colore") = "Tutte" then
    colore = "%"
    else
    colore = request.form("colore")

    End if
    %>
    <%
    if request.form("taglia") = "Tutte" then
    taglia = "%"
    else
    taglia = request.form("taglia")
    End if
    %>
    <%
    if request.form("marca") = "Tutte" then
    marca = "%"
    else
    marca = request.form("marca")
    End if
    %>

    <%
    SQL="SELECT * FROM articolo where colore like " & "'" & colore & "'"
    set Rs = db.execute(sql) %>
    <h1> Gli articoli trovati sono:</h1>
    <table width="90%" border="0">
    <tr>
    <td align=center >
    <h3>Codice</h3>
    </td>
    <td align=center>
    <h3>Tipo</h3>
    </td>
    <td align=center>
    <h3>Prezzo</h3>
    </td>
    <td align=center>
    <h3>Colore</h3>
    </td>
    <td align=center>
    <h3>Taglia</h3>
    </td>
    <td align=center>
    <h3>Marca</h3>
    </td>
    <td align=center>
    <h3>Disponibilità</h3>
    </td>
    <td> <h3>Foto</h3>
    </td>
    </tr>

    </tr>
    <% do while not Rs.eof
    response.write("<td align=center>"& Rs("codice") & "</td>")
    response.write("<td align=center>"& Rs("tipo") & "</td>")
    response.write("<td align=center>"& Rs("prezzo") & "</td>")
    response.write("<td align=center>"& Rs("colore") & "</td>")
    response.write("<td align=center>"& Rs("taglia") & "</td>")
    response.write("<td align=center>"& Rs("marca") & "</td>")
    response.write("<td align=center>"& Rs("disponibilita") & "</td>")
    response.write("<td align=center><img src="& Rs("foto") & " height=50 width=50></td></tr>")



    Rs.movenext
    loop
    Rs.close
    %></table >

    </body>

    </html>




    [SM=x40004] qualcuno saprebbe aiutarmi? [SM=x40004]
    (non spaventatevi x le skifezze nel codice [SM=x39897] ma di asp non so nulla [SM=x40004] )

    grazie x la disponibilità
  • OFFLINE
    sun12
    Post: 1.392
    Post: 1.376
    Registrato il: 21/01/2004
    Età: 41
    Sesso: Maschile
    VocenelWeb
    Super Member
    00 04/05/2006 17:42
    per quel poco che ne so di asp, sarebbe utile sapere che c' è dentro db.asp [SM=x39924]



    ... non è importante che si vinca o che si perda ... è importante vincere o perdere ... da Uomini ...

  • OFFLINE
    ~=€MM@=~
    Post: 100.938
    Post: 3.496
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 04/05/2006 18:20
    db.asp

    <%

    Set db = Server.CreateObject("ADODB.Connection")

    StrConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db.mdb")

    db.open strConn



    %>

  • OFFLINE
    roob
    Post: 7.486
    Post: 5.121
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 04/05/2006 19:57
    Re:

    Scritto da: ~=€MM@=~ 04/05/2006 17.22
    stavo creando un sito in asp, ma ho 2 problemi:
    1. non mi funziona una query di inserimento
    2. non mi funziona la ricerca

    form di iscrizione:

    <html>

    <head>
    <link rel="stylesheet" type="text/css" href="style.css">
    <script language="javascript">
    function verificaCampi(){
    if (document.compila.user.value=="") {
    alert("Il campo username è obbligatorio!");
    return false;
    }
    if (document.compila.pw.value=="") {
    alert("Il campo password è obbligatorio!");
    return false;
    }
    if (document.compila.mail.value=="") {
    alert("Il campo email è obbligatorio!");
    return false;
    }
    else if (document.compila.mail.value.indexOf ('@',0) == -1
    || document.compila.mail.value.indexOf ('.',0) == -1){
    alert("Il campo email deve contenere i caratteri '@' e '.'")


    return false;
    }

    else
    return true;
    }
    </SCRIPT>




    </head>

    <body>


    <form method="POST" action="iscriviti.asp" name=compila onSubmit="return verificaCampi();">

    <table border="0" width="45%">
    <tr>
    <td width="50%">Username*</td>
    <td width="50%"><input type="text" name="user" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Password*</td>
    <td width="50%"><input type="password" name="pw" size="20"></td>
    </tr>
    <tr>
    <td width="50%">E-mail*</td>
    <td width="50%"><input type="text" name="mail" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Nome</td>
    <td width="50%"><input type="text" name="nome" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Cognome</td>
    <td width="50%"><input type="text" name="cognome" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Sesso</td>
    <td width="50%">
    <table align=center border="0" width="80%">
    <tr>
    <td align=center width="50%">M<input type="radio" value="m" name="sex"></td>
    <td align=center width="50%">F<input type="radio" name="sex" value="f"></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="50%">Indirizzo</td>
    <td width="50%"> <table border="0" width="80%">
    <tr>
    <td align=center width="50%"><input type="text" name="via" size=15></td>
    <td align=center width="50%">N°<input type="text" name="nc" size=3></td>
    </tr></table></td>
    </tr>

    <tr>
    <td width="50%">Città</td>
    <td width="50%"><input type="text" name="citta" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Codice Fiscale</td>
    <td width="50%"><input type="text" name="codfisc" size="20"></td>
    </tr>
    <tr>
    <td width="50%">Telefono</td>
    <td width="50%"><input type="text" name="telefono" size="20"></td>
    </tr>

    </table>
    </td>
    </tr>
    </table>

    <p><input type="submit" value="Invia"><input type="reset" value="Cancella tutti i campi" name="reset"></p>
    </form>
    <p>I CAMPI CONTRASSEGNATI DA * SONO OBBLIGATORI</p>

    </body>

    </html>


    iscriviti.asp

    <html>

    <head>
    <title>Index</title>
    </head>
    <!--#include file="db.asp"-->

    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user")&"', utente)"')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>



    cosa c'è di sbagliato? [SM=x40004]


    form di ricerca:

    <html>

    <head>
    <link rel="stylesheet" type="text/css" href="style.css">

    </head>
    <!--#include file="db.asp"-->
    <body>

    <form method="POST" action="cerca.asp">

    <%sql="select DISTINCT tipo FROM articolo"
    set rs=db.execute(sql)%>

    <table border="0">
    <tr>
    <td>Tipologia</td>
    <td><select size="1" name="tipo">
    <option value="Tutte" selected>Qualsiasi tipologia</option>
    <%while not rs.eof%>
    <option value='<%=rs("tipo")%>'> <%=rs("tipo")%> </option>
    <%rs.movenext
    wend%>


    </select></td>
    </tr>

    <%sql="select DISTINCT prezzo FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Prezzo</td>
    <td><input type="text" name="prezzo" size="6"></td>

    </tr>

    </tr>

    <%sql="select DISTINCT colore FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Colore</td>
    <td><select size="1" name="tipo">
    <option value="Tutte" selected>Qualsiasi colore</option>
    <%while not rs.eof%>
    <option value='<%=rs("colore")%>'> <%=rs("colore")%> </option>
    <%rs.movenext
    wend%>



    </select></td>
    </tr>

    <%sql="select DISTINCT taglia FROM articolo"
    set rs=db.execute(sql)%>
    <tr>
    <td>Taglia</td>
    <td><select size="1" name="tipo">
    <option selected value="Tutte">Qualsiasi taglia</option>
    <%while not rs.eof%>
    <option value='<%=rs("taglia")%>'> <%=rs("taglia")%> </option>
    <%rs.movenext
    wend%>

    </select></td>
    </tr>
    <%sql="select DISTINCT marca FROM articolo"
    set rs=db.execute(sql)%> <tr>
    <td>Marca</td>
    <td><select size="1" name="marca">
    <option selected value="Tutte">Qualsiasi marca</option>
    <%while not rs.eof%>
    <option value='<%=rs("marca")%>'> <%=rs("marca")%> </option>
    <%rs.movenext
    wend%>

    </select></td>
    </tr>


    </table>
    <p><input type="submit" value="Invia" name="invio"><input type="reset" value="Cancella tutti i campi" name="reset"></p>
    </form>

    </body>

    </html>



    cerca.asp:

    <html>
    <head>
    <title>Index</title>


    <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <!--#include file="db.asp"-->
    <body>
    <%
    if request.form("tipo") = "Tutte" then
    tipo = "%"
    else
    tipo = request.form("tipo")
    End if
    %>
    <%
    if request.form("prezzo") = "" then
    prezzo = "%"
    else
    prezzo = request.form("prezzo")
    End if
    %>
    <%
    if request.form("colore") = "Tutte" then
    colore = "%"
    else
    colore = request.form("colore")

    End if
    %>
    <%
    if request.form("taglia") = "Tutte" then
    taglia = "%"
    else
    taglia = request.form("taglia")
    End if
    %>
    <%
    if request.form("marca") = "Tutte" then
    marca = "%"
    else
    marca = request.form("marca")
    End if
    %>

    <%
    SQL="SELECT * FROM articolo where colore like " & "'" & colore & "'"
    set Rs = db.execute(sql) %>
    <h1> Gli articoli trovati sono:</h1>
    <table width="90%" border="0">
    <tr>
    <td align=center >
    <h3>Codice</h3>
    </td>
    <td align=center>
    <h3>Tipo</h3>
    </td>
    <td align=center>
    <h3>Prezzo</h3>
    </td>
    <td align=center>
    <h3>Colore</h3>
    </td>
    <td align=center>
    <h3>Taglia</h3>
    </td>
    <td align=center>
    <h3>Marca</h3>
    </td>
    <td align=center>
    <h3>Disponibilità</h3>
    </td>
    <td> <h3>Foto</h3>
    </td>
    </tr>

    </tr>
    <% do while not Rs.eof
    response.write("<td align=center>"& Rs("codice") & "</td>")
    response.write("<td align=center>"& Rs("tipo") & "</td>")
    response.write("<td align=center>"& Rs("prezzo") & "</td>")
    response.write("<td align=center>"& Rs("colore") & "</td>")
    response.write("<td align=center>"& Rs("taglia") & "</td>")
    response.write("<td align=center>"& Rs("marca") & "</td>")
    response.write("<td align=center>"& Rs("disponibilita") & "</td>")
    response.write("<td align=center><img src="& Rs("foto") & " height=50 width=50></td></tr>")



    Rs.movenext
    loop
    Rs.close
    %></table >

    </body>

    </html>




    [SM=x40004] qualcuno saprebbe aiutarmi? [SM=x40004]
    (non spaventatevi x le skifezze nel codice [SM=x39897] ma di asp non so nulla [SM=x40004] )

    grazie x la disponibilità



    è un po' difficile sapere cosa c'è di sbagliato senza conoscere nè il messaggio d'errore nè la riga di codice in cui esso viene generato [SM=x39917]
    Modificato da roob 04/05/2006 19.58
  • OFFLINE
    ~=€MM@=~
    Post: 100.965
    Post: 3.497
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 04/05/2006 20:13
    il primo mi da errore di sintassi in insert into, alla riga dv c'è set rs= db.execute [SM=x39917]

    il secondo nn mi da messaggi d errori ma nn funziona..mi visualizza una tabella vuota
  • OFFLINE
    roob
    Post: 7.487
    Post: 5.122
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 04/05/2006 22:34
    Re:
    prova a sostituire il file "iscriviti.asp" con questo qui:



    <html>

    <head>
    <title>Index</title>
    </head>
    <!--#include file="db.asp"-->

    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user") & "', 'utente')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>
  • OFFLINE
    ~=€MM@=~
    Post: 101.039
    Post: 3.498
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 18:33
    Microsoft JET Database Engine error '80040e14'

    Syntax error in INSERT INTO statement.

    /frozenwear/iscriviti.asp, line 13
  • OFFLINE
    g
    Post: 106.271
    Post: 38.492
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 18:50
    Re: Re:

    Scritto da: roob 04/05/2006 22.34
    prova a sostituire il file "iscriviti.asp" con questo qui:



    <html>

    <head>
    Index
    </head>


    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user") & "', 'utente')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>

    La riga 13 è lei
    HAi creato il DB in modo appropriato? [SM=x39948]
  • OFFLINE
    ~=€MM@=~
    Post: 101.073
    Post: 3.499
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 20:00
    si [SM=x40004]
    e se la stessa query propvo a esegurla dentro access funziona [SM=x40004]
  • OFFLINE
    g
    Post: 106.287
    Post: 38.497
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 20:21
    Re:

    Scritto da: ~=€MM@=~ 05/05/2006 20.00
    si [SM=x40004]
    e se la stessa query propvo a esegurla dentro access funziona [SM=x40004]

    Rs con la R maiuscola? [SM=x39913]
  • OFFLINE
    ~=€MM@=~
    Post: 101.075
    Post: 3.500
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 21:16
    anche se cambio nn va [SM=x40004]
  • OFFLINE
    g
    Post: 106.300
    Post: 38.506
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 21:24
    Re: Re:

    Scritto da: roob 04/05/2006 22.34
    prova a sostituire il file "iscriviti.asp" con questo qui:



    <html>

    <head>
    Index
    </head>


    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user") & "', 'utente')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>

    [SM=x39884]
  • OFFLINE
    g
    Post: 106.301
    Post: 38.507
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 21:28
    Re: Re:

    Scritto da: roob 04/05/2006 22.34
    prova a sostituire il file "iscriviti.asp" con questo qui:



    <html>

    <head>
    Index
    </head>


    <body>

    <%
    SQL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo) VALUES ('"& request.form("nome") &"', '"& request.form("cognome") &"', '"& request.form("via") &"', '"& request.form("nc") &"', '"& request.form("citta") &"','"& request.form("telefono") &"', '"& request.form("codfisc") &"', '"& request.form("mail") &"', '"& request.form("sex") &"', '"& request.form("pw") &"', '"& request.form("user") & "', 'utente')"
    response.write(sql)
    set Rs = db.execute(sql)
    response.redirect "index.htm"
    %>
    </body>

    </html>

    Tipo nn è immesso ol3 a differenti nomi della variabili [SM=x39884]
  • OFFLINE
    roob
    Post: 7.488
    Post: 5.123
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 05/05/2006 21:49
    Forse qualche campo del database , come NC o TELEFONO è definito come numerico ?
    In questo caso l'Istruzione SQL sarebbe sbagliata perchè inserisce tutti i valori come stringa.

  • OFFLINE
    roob
    Post: 7.489
    Post: 5.124
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 05/05/2006 21:56
    Re: Re: Re:

    Scritto da: g 05/05/2006 21.28
    Tipo nn è immesso ol3 a differenti nomi della variabili [SM=x39884]



    che dici g ? spiegati meglio che non capisco.
  • OFFLINE
    g
    Post: 106.306
    Post: 38.510
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 05/05/2006 22:03
    Re: Re: Re: Re:

    Scritto da: roob 05/05/2006 21.56


    che dici g ? spiegati meglio che non capisco.

    QL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo)
  • OFFLINE
    ~=€MM@=~
    Post: 101.120
    Post: 3.501
    Registrato il: 09/01/2004
    Città: MILANO
    Età: 36
    Sesso: Femminile
    VocenelWeb
    Forum Addicted
    00 06/05/2006 11:33
    Re:

    Scritto da: roob 05/05/2006 21.49
    Forse qualche campo del database , come NC o TELEFONO è definito come numerico ?
    In questo caso l'Istruzione SQL sarebbe sbagliata perchè inserisce tutti i valori come stringa.



    no, sono tutti campi testo [SM=x40004]
  • OFFLINE
    roob
    Post: 7.490
    Post: 5.125
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 06/05/2006 11:50
    Re: Re: Re: Re: Re:

    Scritto da: g 05/05/2006 22.03
    QL="INSERT INTO cliente (nome, cognome, via, ncivico, citta, telefono, codfiscale, email, sesso, password, username, tipo)



    si , nel campo tipo c'era messo il valore utente ed io l'ho cambiato in 'utente' con le virgolette



  • OFFLINE
    g
    Post: 106.363
    Post: 38.539
    Registrato il: 15/09/2001
    Sesso: Maschile
    VocenelWeb
    Forum Addicted
    00 06/05/2006 13:34
    Re: Re: Re: Re: Re: Re:

    Scritto da: roob 06/05/2006 11.50


    si , nel campo tipo c'era messo il valore utente ed io l'ho cambiato in 'utente' con le virgolette




    [SM=x39884]
  • OFFLINE
    roob
    Post: 7.491
    Post: 5.126
    Registrato il: 21/04/2001
    Sesso: Maschile
    Moderator
    Forum Addicted
    00 06/05/2006 18:51
    Re:

    Scritto da: ~=€MM@=~ 05/05/2006 20.00
    si [SM=x40004]
    e se la stessa query propvo a esegurla dentro access funziona [SM=x40004]



    Allora il problema deve essere nel database, evidentemente c'è qualche problema di compatibilità.
    Non mi è possibile andare oltre se non ho tutto il programma ed il database originale.
    Da dove l'hai scaricato ?



1