This is what I've already tried, but it doesn't work...<BR>Do you have an example that works??<BR>Here the SQL command:<BR>SQL="UPDATE "& strValueTable &" SET " & NameArray(i) & "='" & ValueArray(i) & "' WHERE ID=" & id<BR><BR>when ValueArray(i)==NULL then error that field can't be a string with length=0. same for "".
Ah - but if the array value is NULL then your SQL ends up:<BR><BR>UPDATE table SET column = '' WHERE...<BR><BR>So you're actually trying to insert an empty string, not a NULL. The easiest way around this is probably to change your database to allow zero-length strings in that field. The other option is to check if Trim(ValueArray(i)) = "" and if so change the SQL to<BR><BR>UPDATE table SET column = NULL WHERE...<BR><BR>Dunc<BR>