Salve a tutti, ho scaricato da qui
http://www.sitoaperto.it/progettiScr...oneRecords.asp
questo sistema per vedere, inserire e modificare il contenuto di un database access, dopo averlo sistemato un pochino sempre tramite questo forum perche non era totalmente funzionante.
sinceramente sarei interessato soltanto alla parte dove vede e quella dove modifica il contenuto del mdb perche ho gia un modulo d'inserimento.
Mi e sorto un piccolo problemino dovrei inserire altre tabelle nel mdb che sono le seguenti:
login = tipo testo
pass = tipo testo
nome = tipo testo
nome_1 = tipo testo
cognome = tipo testo
data_di_nascita = tipo testo
codice_fiscale_o_partita_iva = tipo testo
indirizzo = tipo testo
civico = tipo testo
cap = tipo testo
citta = tipo testo
provincia = tipo testo
regione = tipo testo
nazione = tipo testo
telefono = tipo testo
cellulare = tipo testo
fax = tipo testo
email = tipo testo
sito_internet = tipo testo
queste sono le pagine scaricate:
__________________________________________________ ___________
1procModificaNome.asp
<%
numeroRecord=request("id")
sql = "SELECT * FROM nome WHERE Id="&numeroRecord
%>
<%
rs("nome")=request.form("nome")
rs("data")=date
rs.update
rs.Close
set rs = Nothing
objConn.Close
set conn = Nothing
%>
Eseguito
Edita
__________________________________________________ ___________
cancellaNome.asp
<%
sql = "SELECT * FROM nome"
%>
<%
do while not(rs.eof)
response.write rs("nome")
%>
">Cancella
<%
rs.movenext
loop
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
%>
Edita
__________________________________________________ ___________
formNome.asp
<html>
<head>
</head>
<body>
<form method="POST" action="procFormNome.asp">
Nome:
<input type="text" name="nome" size="20">
<input type="hidden" name="data" value="<%=date%>">
<input type="submit" value="Invia">
</form>
</body>
</html>
__________________________________________________ ___________
modificaNome.asp
<%
sql = "SELECT * FROM nome"
%>
<%
do while not rs.eof
response.write rs("nome")
%>
">Modifica
<%
rs.movenext
loop
rs.Close
set rs = Nothing
objConn.Close
set conn = Nothing
%>
Edita
__________________________________________________ ___________
procCancellaNome.asp
<%
numeroRecord=request("id")
sql = "SELECT * FROM nome where id=" & numeroRecord
%>
<%
rs.delete
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
%>
Eseguito
Edita
__________________________________________________ ___________
procFormNome.asp
1
<%
nome = request.form("nome")
data = request.form("data")
if nome="" then
response.write "Devi inserire un dato" & "
"
response.write "" & "Torna a Form" & ""
response.end
end if
sql = "SELECT * FROM nome"
%>
<%
rs.addnew
rs("nome") = nome
rs("data") = data
rs.update
rs.Close
set rs = Nothing
conn.Close
s et objConn = Nothing
%>
Eseguito
Edita
__________________________________________________ ___________
procModificaNome.asp
<%
numeroRecord=request("id")
sql = "SELECT * FROM nome WHERE Id="&numeroRecord
%>
<form method=post action="1procModificaNome.asp?id=<%=rs("ID")%>">
Nome:
<input type="text" name="nome" value="<%=rs("nome")%>" size="20">
<input type="submit" value="Modifica">
</form>
<%
rs.Close
set rs = Nothing
objConn.Close
set conn = Nothing
%>
__________________________________________________ ___________
stringaConnessione.asp
<%
' Definisci la connessione
Set objConn = Server.CreateObject("ADODB.Connection")
' Definisci stringa di connessione
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("mdb-database/nome.mdb")
' Apri la connessione
objConn.Open strConn
%>
__________________________________________________ ___________
stringaRecordset.asp
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, objConn ,3,3
%>
__________________________________________________ ___________
visnome.asp
<%
sql = "SELECT * FROM nome"
%>
<%
do while not rs.eof
response.write rs("nome") & "
"
response.write rs("data") & "
"
rs.movenext
loop
rs.Close
set rs = Nothing
objConn.Close
set conn = Nothing
%>
Edita
__________________________________________________ ___________
edita.asp
<head>
</head>
<body>
Aggiungi Records
Visualizza Records
Modifica Records
Cancella Records
</body>
</html>
Grazie a tutti![]()