Originariamente inviato da Starky
quindi, secondo te, sarebbe meglio che io differenziassi il nome della variabile a seconda del file che devo aggiornare?

così:

codice:
' immagine piccola
<a href="cambia_file.asp?appunt_id=<%=rs_select("APPUNTAMENTO_ID")%>
&nome_file_min =<%=rs_select("APPUNTAMENTO_FILE_MIN")%>">


'immagine grande
 <a href="cambia_file.asp?appunt_id=<%=rs_select("APPUNTAMENTO_ID")%>
&nome_file =<%=rs_select("APPUNTAMENTO_FILE")%>">
poi recupero

codice:
 
nome_file_min = Request.QueryString("nome_file_min")
nome_file = Request.QueryString("nome_file")
e faccio una select

codice:
 
SELECT * FROM APPUNTAMENTI WHERE APPUNTAMENTO_FILE_MIN=nome_file_min 

OR APPUNTAMENTO_FILE=nome_file AND APPUNTAMENTO_ID=appuntamento_id
sarebbe giusto come ragionamento?

Ragionamento giusto, pero' io seguirei un'altra procedura :


codice:
' immagine piccola
<a href="cambia_file.asp?app_id=<%=rs_select("APPUNTAMENTO_ID")%>
&nomefile=<%=rs_select("APPUNTAMENTO_FILE_MIN")%>&type=1">


'immagine grande
<a href="cambia_file.asp?app_id=<%=rs_select("APPUNTAMENTO_ID")%>
&nomefile=<%=rs_select("APPUNTAMENTO_FILE_MIN")%>&type=0">

e poi nell'altra pagina :

codice:
 
nome_file = Request.QueryString("nomefile")
tipo = Request.QueryString("type")
app_id = Request.QueryString("app_id")
if tipo = 1 then
  campo = "Appuntamento_file_min"
else 
  campo = "Appuntamento_file"
e faccio una select

codice:
 
"SELECT * FROM APPUNTAMENTI WHERE " & campo & "=" & nome_file & " AND APPUNTAMENTO_ID=" & app_id


Ciao