<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Set a row value to Null in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141899#M3700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How does one set a row value to null?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = "" sets it to an empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = nothing also sets it to an empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = system.dbnull&amp;nbsp; generates an error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the field calculator you can create an expression like Field1 = null and it will set the values to Null, but how do you do it in .NET?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Nov 2011 03:06:59 GMT</pubDate>
    <dc:creator>BerndtNording</dc:creator>
    <dc:date>2011-11-06T03:06:59Z</dc:date>
    <item>
      <title>Set a row value to Null</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141899#M3700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How does one set a row value to null?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = "" sets it to an empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = nothing also sets it to an empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pRow.Value(i) = system.dbnull&amp;nbsp; generates an error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the field calculator you can create an expression like Field1 = null and it will set the values to Null, but how do you do it in .NET?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2011 03:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141899#M3700</guid>
      <dc:creator>BerndtNording</dc:creator>
      <dc:date>2011-11-06T03:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set a row value to Null</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141900#M3701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How does one set a row value to null?&lt;BR /&gt;&lt;BR /&gt;pRow.Value(i) = "" sets it to an empty string&lt;BR /&gt;pRow.Value(i) = nothing also sets it to an empty string&lt;BR /&gt;pRow.Value(i) = system.dbnull&amp;nbsp; generates an error&lt;BR /&gt;&lt;BR /&gt;in the field calculator you can create an expression like Field1 = null and it will set the values to Null, but how do you do it in .NET?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check out &lt;/SPAN&gt;&lt;A href="http://www.c-sharpcorner.com/UploadFile/sd_patel/EnterNullValuesForDateTime11222005015742AM/EnterNullValuesForDateTime.aspx"&gt;this link&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; It seems to list a way to generate a null value, at least for date fields.&amp;nbsp; Let me know if this points you in the right direction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2011 04:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141900#M3701</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2011-11-06T04:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set a row value to Null</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141901#M3702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See also &lt;/SPAN&gt;&lt;A href="http://www.devnewsgroups.net/adonet/t4039-adding-null-vb-net-field.aspx"&gt;this link&lt;/A&gt;&lt;SPAN&gt; for string fields.&amp;nbsp; It seems you should use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;field.value = dbNull.value.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2011 04:52:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141901#M3702</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2011-11-06T04:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set a row value to Null</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141902#M3703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How does one set a row value to null?&lt;BR /&gt;&lt;BR /&gt;pRow.Value(i) = "" sets it to an empty string&lt;BR /&gt;pRow.Value(i) = nothing also sets it to an empty string&lt;BR /&gt;pRow.Value(i) = system.dbnull&amp;nbsp; generates an error&lt;BR /&gt;&lt;BR /&gt;in the field calculator you can create an expression like Field1 = null and it will set the values to Null, but how do you do it in .NET?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

pRow.Value(i) = System.DBNull.Value

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-a-row-value-to-null/m-p/141902#M3703</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T07:49:03Z</dc:date>
    </item>
  </channel>
</rss>

