- <%
- Dim rs
-
-
- set rs = server.createObject ("ADODB.recordset")
-
-
- Set conn = Server.CreateObject("ADODB.Connection")
-
-
- connstring="DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.MapPath(".") & "\nom de la base.mdb"
- conn.Open connstring
-
-
- sql = "select * from nom de la table "
- rs.Open sql, conn, 3, 3
- rs.movefirst
-
-
- if trim(request("nom du champs 1 a modifier"))<>"" then
- rs.fields("nom du champs 1 a modifier")=request("nom du champs 1 a modifier")
- end if
-
- if trim(request("nom du champs 2 a modifier"))<>"" then
- rs.fields("nom du champs 2 a modifier")=request("nom du champs 2 a modifier")
-
-
-
- rs.updateBatch
-
-
- rs.close
- set rs=nothing
- conn.close
- set conn=nothing
- response.redirect "nom de la pages.asp"
- end if
-
- %>
- <html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- </head>
-
- <body bgcolor="#FFFFFF" text="#000000">
- <form name="form1" method="post" action="">
- <p>
- <input type="text" name="ot" value="<% =request("nom du champs 1 a modifier") %>">
- Premier champs</p>
- <p>
- <input type="text" name="desc" value="<% =request("nom du champs 2 a modifier") %>">
- Deuxieme champs</p>
- <p>
- <input type="submit" name="action" value="modifier">
- </p>
- </form>
- </body>
- </html>
-
<%
Dim rs
set rs = server.createObject ("ADODB.recordset")
Set conn = Server.CreateObject("ADODB.Connection")
connstring="DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.MapPath(".") & "\nom de la base.mdb"
conn.Open connstring
sql = "select * from nom de la table "
rs.Open sql, conn, 3, 3
rs.movefirst
if trim(request("nom du champs 1 a modifier"))<>"" then
rs.fields("nom du champs 1 a modifier")=request("nom du champs 1 a modifier")
end if
if trim(request("nom du champs 2 a modifier"))<>"" then
rs.fields("nom du champs 2 a modifier")=request("nom du champs 2 a modifier")
rs.updateBatch
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "nom de la pages.asp"
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<p>
<input type="text" name="ot" value="<% =request("nom du champs 1 a modifier") %>">
Premier champs</p>
<p>
<input type="text" name="desc" value="<% =request("nom du champs 2 a modifier") %>">
Deuxieme champs</p>
<p>
<input type="submit" name="action" value="modifier">
</p>
</form>
</body>
</html>