paocavo
In ogni caso io non userei sql secche da far eseguire a conn.execute, usereri l'oggetto Recordset con lock pessimistico ed il metodo AddNew. In questo modo evito di fare due query distinte per ottenere l'ultimo identificativo, qualcosa del tipo:
[FONT=Times New Roman][SIZE=3]Set conn_iscrizione = Server.CreateObject("ADODB.Connection")[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]conn_iscrizione.Open "Driver={MySQL};SERVER=XX.XXX.XXX.XX;Database=SqlXXXXX_X;port=XXXX;UID= SqlXXXXX;PWD=XXXXXXXXXXX;"[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]Set myRecSet = Server.CreateObject("ADODB.Recordset")[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet.Open("select * from mod_iscri_fis"), conn_iscrizione, adLockPessimistic[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet.AddNew[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet("data") = data[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][FONT=Times New Roman][SIZE=3]myRecSet("nome") = nome[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet("cognome") = cognome[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet("data_nascita") = data_nascita[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet.Update[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Dim LastID = myRecSet("id")[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]myRecSet.Close[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Set myRecSet = Nothing[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Set [/SIZE][/FONT][FONT=Times New Roman][SIZE=3]conn_iscrizione = Nothing[/SIZE][/FONT]
[/SIZE][/FONT]
Non dimenticare di chiudere e distruggere (set nome_oggetto = Nothing) tutti gli oggetti quando non ti servono più!!
Caro paocavo,
per piacere non chiedermi come, dove, perchè, ma ora funziona, Funziona, FUNZIONAAAAA [image: tupitupi.gif] [image: tupitupi.gif] [image: tupitupi.gif] [image: tupitupi.gif]
Io ti descrivo cosa ho fatto:
Ho inserito il file di connessione:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn_iscrizione.asp" -->
Ho creato la mia tabella, e prima di inserire i campi ho messo questo script:
<%
Sql_last_id = "select * from mod_iscri_fis where id="&cint(request("id"))
set rs_last_id=conn.execute(Sql_last_id)
%>
Infine per ogni campo ho inserito questo script di richiamo:
<%=rs_last_id("data")%>
<%=rs_last_id("nome")%>
<%=rs_last_id("cognome")%>
e cosi via....
GRAZIE 10000000000000000000000
Ps: la tua soluzione la provo subito.