Why can’t zero-length strings be inserted using INSERT INTO SQL?
When I try to insert fields of a new record, and if one of them is a zero-length, the insert fails.
I can insert nulls but not zero-length- very odd! Following is my SQL:
strSQL = “INSERT INTO tblNTLogIgnoredEntries (Server, LogName, Detail02) ”
strSQL = strSQL & “VALUES (‘” & rsTrimAdd(“Server”) & “‘, ‘” & rsTrimAdd(“LogName”) & “‘, ”
strSQL = strSQL & “‘” & rsTrimAdd(“Detail02”) & “‘”
strSQL = strSQL & “);”
If any of the values is zero-length, the insert will fail. If all other cases (non-zero and null), insert is successful;
What should I do to have success? My workaround is to populate the source table with a single space character for each zero-length field.
Thank you!
–llyal