OK grazie molto gentile come sempre
Prima pagina
codice:
<%
view=Request.QueryString("view")
fday=day(now)
fmonth=month(now)
fyear=year(now)
giorno = request.QueryString("day")
mese = request.QueryString("month")
anno = request.QueryString("year")
'response.Write giorno&mese&anno
'response.End()
Set Conn = Server.createobject("ADODB.Connection")
Conn.connectionstring="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.Mappath("/mdb-database/soci.mdb")
Conn.Open
set rs = server.CreateObject("ADODB.recordset")
sql ="select * from socin where assicurazione='SI' and (bmonth between "&mese&" and "&fmonth&") and (bday between "&giorno&" and "&fday&") and (byear between "&anno&" and "&fyear&") and registrato='registrato' order by fax"
RS.Open SQL,Conn
if rs.EOF THEN
%>
<p align="center"><font color="#FF0000" size="4">Nessun record trovato</font></p>
<%
rs.Close
Set rs = nothing
else
%>
<center>
<table width="900 px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" align="center">[img]xxx/tessera.jpg[/img]</td>
</tr>
<tr>
<td colspan="3" align="center">POLIZZA MULTISCI STAGIONE 2008/2009</td>
</tr>
<tr>
<td >SCI CLUB CAIRESE</td>
<td ></td>
<td ><div align="right">ELENCO DAL <font color="#FF0000"><%=giorno%>/<%=mese%>/<%=anno%></font> al <font color="#FF0000"><%=fday%>/<%=fmonth%>/<%=fyear%></font> </div></td>
</tr>
</table>
<table width="900 px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100px"><div align="center">Fax ass</div></td>
<td width="150px"><div align="center">Cognome Assicurato</div></td>
<td width="150px"><div align="center">Nome Assicurato</div></td>
<td width="200px"><div align="center">Nato</div></td>
<td width="200px"><div align="center">Nato il </div></td>
<td width="100px"><div align="center">REG </div></td>
</tr>
<%
While not rs.EOF
'Session.LCID = 1033
%>
<tr>
<td width="100px"><div align="center"><%=RS("fax")%></div></td>
<td width="150px"><div align="center"><%=RS("cognome")%></div></td>
<td width="150px"><div align="center"><%=RS("nome")%></div></td>
<td width="200px"><div align="center"><%=RS("nato")%></div></td>
<td width="200px"><div align="center"><%=RS("nday")%>/<%=RS("nmonth")%>/<%=RS("nyear")%></div></td>
<td width="100px"><div align="center"><%=RS("bday")%>/<%=RS("bmonth")%>/<%=RS("byear")%></div></td>
</tr>
<form action="save_ass.asp" method="post">
<input type="hidden" name="giorno" value="<%=day(now)%>" />
<input type="hidden" name="mese" value="<%=month(now)%>" />
<input type="hidden" name="anno" value="<%=year(now)%>" />
<input type="hidden" name="nome" value="<%=RS("nome")%>" />
<input type="hidden" name="cognome" value="<%=RS("cognome")%>" />
<input type="hidden" name="fax" value="<%=RS("fax")%>">
<input type="hidden" name="nday" value="<%=RS("nday")%>" />
<input type="hidden" name="nmonth" value="<%=RS("nmonth")%>" />
<input type="hidden" name="nyear" value="<%=RS("nyear")%>">
<%
RS.MoveNext
wend
%>
</table>
<input type="submit" value="INVVIA ASSICURAZIONI" name="metodo" />
</form>
<font face="Times New Roman, Times, serif" size="3" color="#000000">
Con la firma in calce si esprime il consenso alla raccolta ed al trattamento dei dati anagrafici ai sensi della
Legge 196/2003
Il presidente Berigliano Luciano
</font>
</center>
<%
rs.Close
set rs = nothing
end if
conn.close
set conn = nothing
%>
<center>
[img]xxx/stamp.gif[/img]
[img]xxx/pag_i.gif[/img]
</center>
seconda pagina per inserimento multiplo dove recupero i valori e tento di fare inserimento multiplo
codice:
<%
For i = 1 To Request.Form.count
ReDim arraycognome(i)
ReDim arraynome(i)
ReDim arrayfax(i)
ReDim arraybday(i)
ReDim arraybmonth(i)
ReDim arraybyear(i)
ReDim arraynday(i)
ReDim arraynmonth(i)
ReDim arraynnyear(i)
arraycognome(i) = Request.Form("cognome")(i)
arraynome(i) = Request.Form("nome")(i)
arrayfax(i) = Request.Form("fax")(i)
arraybday(i) = Request.Form("giorno")(i)
arraybmonth(i) = Request.Form("mese")(i)
arraybyear(i) = Request.Form("anno")(i)
arraynday(i) = Request.Form("nday")(i)
arraynmonth(i) = Request.Form("nmonth")(i)
arraynnyear(i) = Request.Form("nyear")(i)
Set Connn = Server.createobject("ADODB.Connection")
Connn.connectionstring="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.Mappath("/mdb-database/soci.mdb")
Connn.Open
strSQL = "INSERT INTO ass (cognome,nome,fax,bday,bmonth,byear,nday,nmonth,nyear) VALUES ('"&arraycognome(i)&"','"&arraynome(i)&"','"&arrayfax(i)&"','"&arraybday(i)&"','"&arraybmonth(i)&"','"&arraybyear(i)&"','"&arraynday(i)&"','"&arraynmonth(i)&"','"&arraynnyear(i)&"')"
'response.Write strSQL
'response.End()
'objConn.Execute(strSQL)
Next
response.Redirect "via.asp"
%>