sjgrodriguez
Posts: 26
|
Posted: 08/23/2010, 3:27 AM |
|
Hi there.
I have a table called MUESTRAS , with 3 fields: field ID, a field called SAMPLE_CODE , integer, and another field called SENT, boolean, true/false.
I have an asp page with a listbox in a form called "C_ACTA_ENTREGA",. with multiple values selection done, for the field ID.
I have done an On_Click Event, to Update the field SENT from False to True, only for the SAMPLES selected in the listbox.
The problem is that the Onclick event code doesn´t work properly. It only updates the first SAMPLE code, not the multiple selection.
The code used is:
Dim Connection
Set Connection = New clsDBCALIDAD_AGUAS
Connection.Open
Connection.Execute("UPDATE SAMPLE_CODE SET SENT=True WHERE ID IN (" & C_ACTA_ENTREGA1.s_COD_MUESTRA_CLC.Value & ")")
'Connection.Execute("UPDATE MUESTRAS SET ENTREGADA=False")
Connection.Close
Set Connection = Nothing
As i say, if i select in the listbox, for example, three values, 30, 31 and 32, it only updates my the first one, 30. It´s like the "IN" statement is not well done...
Please it would be great if i get some help.
Thanks in advance.
Regards,
Sergio
|
|
|
|