[mapguide-users] Hot to set MgProperty to NULL
Gunter Becker
gunter.becker at csogis.de
Tue Nov 10 03:04:57 EST 2009
Thanks Kenneth.
I've found that SetNull() works for SQL Server 2008 Provider.
But it's very odd to first initialize a "default" value (in my case I use
Int16.MinValue) and then set the whole MgProperty-Object to NULL. Why not
have a constructor that allows NULL values?
Thanks again, Gunter
Kenneth Skovhede, GEOGRAF A/S wrote:
>
> SetNull() is the method to use.
>
> I've found that various providers either break on, or ignore, null values.
>
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
>
> Gunter Becker skrev:
>> Hi,
>>
>> I'd like to update existing features with NULL values.
>> Let's say I have a property called 'age' and I want to delete the value
>> of
>> this property
>> so that I have a null value instead of the integer value.
>>
>> The only contructor I've found needs two parameters. The property name
>> and
>> the property value.
>> The property value can't be null:
>>
>> MgInt16Property newProperty = new MgInt16Property(propertyName,
>> Convert.ToInt16(propertyValue));
>>
>> There is a SetNull-Methode which I can set to 'true' afterwards. But this
>> doesn't affect anything.
>>
>> Any idea on how to update a property with a null value???
>>
>> Thanks Gunter
>>
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://n2.nabble.com/Hot-to-set-MgProperty-to-NULL-tp3973734p3978283.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list