Originariamente inviato da ipnotic
ho utilizzato quello che mi ha scritto andrea ma nn va....cosa sbaglio ? (rispecifico che quello che voglio fare è ke voglio controllare che il dato inserito nel form CODUTENTE sia contenuto nella casella CODUTENTE del mio database...se nn è contenuto deve riposondere all'untente cn Response.Redirect("errore.asp?id=6");
<%@LANGUAGE = JScript%>
<%
var id_risposta = new String(Request.Form("id_risposta"));;
var nome = new String(Request.Form("nome"));
var codutente = new String(Request.Form("codutente"));
var messaggio = new String(Request.Form("messaggio"));
var data = new Date();
var modificato = data.getDate() + "/" + (data.getMonth() + 1) + "/" + data.getYear() + " " + data.getHours() + "." + data.getMinutes() + "." + data.getSeconds();
var Cn = new ActiveXObject("ADODB.Connection");
Cn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("codutente.mdb"));
var Sql = "SELECT codutente From codutente Where codutente = 'codutente'";
var rs = new ActiveXObject("ADODB.Recordset");
rs.Open(Sql,Cn,1);
if (rs.EOF) {
Response.Redirect("errore.asp?id=6");
}
riscrivo la select spiegata xke con il fatto ke ho scelto nomi uguali puo' essere nn kiaro quello ke voglio fare (magari è proprio qua l errore
SELECT nomeDellaCasellaDoveCercareSeCEilCodice From NOMEtabbellaDelDATABASE Where codutente = 'codutente'";