using System;
using System.Collections;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Data.Common
{
get { return IsNull (index) ? DBNull.Value : GetValue (index); }
set {
if (value == null) {
- CopyValue (Column.Table.DefaultValuesRowIndex, index);
+ // Table might not have a default values row to copy from
+ if (Column.Table.DefaultValuesRowIndex == -1) {
+ ZeroOut (index);
+ null_values [index] = true;
+ } else {
+ CopyValue (Column.Table.DefaultValuesRowIndex, index);
+ }
return;
}