set rs=server.createObject("adodb.recordset")
sql = "select * from TPL_REG_BANK where ID_PIN='"&request.form("ID_PIN")&"'"
rs.open sql,conn,1,3
If IsNull(request.form("BANK")) Or request.form("BANK") = "" Then
rs("BANK") = NULL
Else
rs("BANK") = request.form("BANK")
End If
rs("BANK_DEPARTMENT")=request.form("BANK_DEPARTMENT")
rs("BANK_TYPE_ACC")=request.form("BANK_TYPE_ACC")
rs.update
rs.close
ขอบคุณสำหรับคำแนะนำมากมายค่ะ สรุปว่าได้แบบนี้ค่ะ
If Trim(request.form("BANK_DEPARTMENT")) = "" Then
rs("BANK_DEPARTMENT")=NULL
else
rs("BANK_DEPARTMENT")=request.form("BANK_DEPARTMENT")
end if