Proprio non riesco a vedere dove sbaglio. Sembra facile ma non lo vedo.
ho una sql di update con un where che dovrebbe tenere il codicegiocatore, ma aggiorna tutti i giocatori in modo uguale come se non vedesse il where.
Spero possiate aiutarmi.codice:SQL = "" SQL = SQL & "select Giocatori.CodiceGiocatore from Punteggi, Giocatori " SQL = SQL & " where Punteggi.CodiceGiocatore = Giocatori.CodiceGiocatore " SQL = SQL & " and Punteggi.flgRitirato = False" SQL = SQL & " and Punteggi.flgNonPartito = False" SQL = SQL & " and CodiceGara = " & Request.QueryString("Cod") SQL = SQL & " order by Colpi asc, Punteggio desc" Set scosta = Server.CreateObject("ADODB.Recordset") scosta.open SQL,Conn,3,1 if not scosta.EOF then scosta.MoveFirst while not scosta.EOF campopar = spar * inumgiri diff = itotcolpi - campopar scostamento = diff / inumgiri scostamento = formatnumber((scostamento),2) scostamento = replace(scostamento, ",", ".") SQL2= "" SQL2 = SQL2 & "update punteggi set " SQL2 = SQL2 & " scost = " & scostamento SQL2 = SQL2 & " where CodiceGara = " & Request.QueryString("Cod") SQL2 = SQL2 & " and CodiceGiocatore = '" & scosta("CodiceGiocatore") & "'" Response.Write "seconda sql...: " & SQL2 & " " Response.flush set rs=Conn.execute (SQL2) scosta.MoveNext wend end if
Grazie
Dimenticavo.... il campo codicegiocatore è di tipo testo. Ma con tutto il resto dell'inserimento (ne faccio altri update e insert) funziona

Rispondi quotando