Ciao a tutti.
Questa è una query UPDATE che aggiorna i cambi A, B, C e D a secondo se la variabile associata è maggiore di 0:
Il problema è che posso avere tutte le combinazioni verificate, una parte oppure una sola.codice:sql = "UPDATE List SET " if strA > 0 then sql = sql & " A = '" & strA & "' " end if if strB > 0 then sql = sql & " , B = '" & strB & "' " end if if strC > 0 then sql = sql & " , C = '" & strC & "' " end if if strD > 0 then sql = sql & " , D = '" & strD & "' " end if
Come faccio a distinguere quando ad esempio è verificata strB e non è verificata la strA?
Perchè come ho scritto la query mi va in errore a causa della virgola....
Grazie-

Rispondi quotando
