lo script è il seguente :
<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<title>esegui_ricerca</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
dim myAge
myAge = Request.Form("miaEta")
dim mySurname
mySurname = Request.Form("mioCognome")
' mappaggio database
Session("strConn")="Provider=Microsoft.Jet.OLEDB.4 .0;Data Source=" & Server.MapPath("dati.mdb")
Set dbconn=server.createobject("ADODB.Connection")
dbconn.open Session("strConn")
if mySurname != "" and myAge = "" then
str="Select * from utenti where cognome='"& mySurname &"'"
if myAge = "" and mySurname = "" then
str="Select * from utenti where eta='"& myAge &"'"
end if
Set RS_Report=dbconn.execute(str)
If not( RS_Report.BOF and RS_Report.EOF ) then
%>
</p>
<table width="100%" border="1">
<tr>
<td width="2%">Id</td>
<td width="5%">Nome</td>
<td width="6%">Cognome</td>
<td width="3%">Eta</td>
<td width="17%">Cellulare</td>
<td width="23%">Email</td>
<td width="8%">User</td>
<td width="9%">Password</td>
<td width="3%">Ruolo</td>
<td width="24%">Data</td>
</tr>
<tr>
<%
RS_Report.MoveFirst
Do While not RS_Report.EOF
%>
<td><% = RS_Report("id")%></td>
<td><% = RS_Report("nome")%></td>
<td><% = RS_Report("cognome")%></td>
<td><% = RS_Report("eta")%></td>
<td><% = RS_Report("cellulare")%></td>
<td><% = RS_Report("email")%></td>
<td><% = RS_Report("user")%></td>
<td><% = RS_Report("password")%></td>
<td><% = RS_Report("ruolo")%></td>
<td><% = RS_Report("data")%></td>
</tr>
<% RS_Report.MoveNext
Loop
%>
</table>
<%
Else Response.Write("Non è stato trovato alcun valore")
End if
%>
</p>
</p>
</body>
</html>
----------------------------------
l'errore è il seguente :
Tipo di errore:
Errore di compilazione di Microsoft VBScript (0x800A03F9)
Previsto 'Then'
/RICERCA/esegui_ricerca.asp, line 22, column 35
if not mySurname = 0 and myAge = 0 ) then
...a me sembra almeno concettualmente corretto, cosa sbaglio? perchè dice che è previsto Then e then ci sta?
Aiuto :-)

Rispondi quotando
