antonio2002
Technical User
tnx for your time,
-------------------------------------------------
<%
db1 = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("db\guestbook.mdb"
&";DefaultDir="& Server.MapPath("."
&";DriverId=25;FIL=MS Access;MaxBufferSize=512;PageTimeout=5"
Dim DBConn, strSECTION
Set DBConn = Server.CreateObject("ADODB.Connection"
DBConn.Open db1
Set CmdA = Server.CreateObject("ADODB.Recordset"
CmdA.Open "guest", DBConn,1, 3
if request("action"
= "new" then
CmdA.AddNew
if not request("email"
= "" then CmdA("email"
= replace(request("email"
,"&","and"
if not request("mess"
= "" then CmdA("message"
= replace(request("mess"
,"&","and"
if not request("name"
= "" then CmdA("name"
= replace(request("name"
,"&","and"
CmdA.Update
%>succes=1<%
else
%>count=<%=CmdA.recordCount%><%
if not CmdA.Eof then
%>&f_name<%=x%>=<%=CmdA("name"
%>&f_mess<%=x%>=<%=CmdA("message"
%>&f_email<%=x%>=<%=CmdA("email"
%><%
end if
x = 0
do until CmdA.Eof
x = x + 1
%>&name<%=x%>=<%=CmdA("name"
%>&mess<%=x%>=<%=CmdA("message"
%>&email<%=x%>=<%=CmdA("email"
%><%
CmdA.Movenext
loop
-----------------------------------------
-------------------------------------------------
<%
db1 = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("db\guestbook.mdb"
Dim DBConn, strSECTION
Set DBConn = Server.CreateObject("ADODB.Connection"
DBConn.Open db1
Set CmdA = Server.CreateObject("ADODB.Recordset"
CmdA.Open "guest", DBConn,1, 3
if request("action"
CmdA.AddNew
if not request("email"
if not request("mess"
if not request("name"
CmdA.Update
%>succes=1<%
else
%>count=<%=CmdA.recordCount%><%
if not CmdA.Eof then
%>&f_name<%=x%>=<%=CmdA("name"
end if
x = 0
do until CmdA.Eof
x = x + 1
%>&name<%=x%>=<%=CmdA("name"
CmdA.Movenext
loop
-----------------------------------------