[mapguide-users] RE: Request for help inserting new row into SDF file.

Matthew D matthew.dunstan at nanaimo.ca
Wed Feb 28 14:55:31 EST 2007


Thanks Dave,

Jason finally got it working.  You were correct, the sdf xml content was set
to Readonly.

Unfortunately there did not seem to be a way in Studio to set it to
writable.
The mapagent tool was used to both detect it as readonly and set it to
false.

Thanks,
Matt



Dave Wilson-3 wrote:
> 
> A geometry property is optional.
> 
> More importantly is the existing SDF ReadOnly? If you do a
> DescribeSchema on it is it listed as ReadOnly? 
> 
> Is it possible that you are inserting a duplicate key value? That will
> fail silently (known bug).
> 
> Dave
> 
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jackie Ng
> Sent: Tuesday, February 27, 2007 5:32 PM
> To: mapguide-users at lists.osgeo.org
> Subject: Re: [mapguide-users] Request for help inserting new row into
> SDF file.
> 
> 
> I don't think you can insert data without a geometry component in SDF
> files.
> 
> - Jackie
> 
> 
> Matthew D wrote:
>> 
>> I am attempting to insert a feature/record into an SDF file.  The 
>> record does not have any geometry.
>> 
>> I have no problem returning data from this code $featureReader = 
>> $featureService->SelectFeatures($featureResId, $class, $queryOptions);
>> 
>> 
>> The insert method doesn't seem to work AND does not give any error 
>> messages why not.
>> 
>> $propertyValues = new MgPropertyCollection(); $propertyValues->Add(new
> 
>> MgInt64Property('mow_id', 3)); $propertyValues->Add(new 
>> MgInt64Property('seg_id', 2231)); $propertyValues->Add(new 
>> MgInt16Property('percent_required', 100)); $propertyValues->Add(new 
>> MgStringProperty('contractor', 'Mow Machine 65')); 
>> $propertyValues->Add(new MgStringProperty('mow_date', '20070202')); 
>> $propertyValues->Add(new MgStringProperty('comments', 'Some 
>> comments'));
>> 		
>> $commands = new MgFeatureCommandCollection(); $commands->Add(new 
>> MgInsertFeatures($class, $propertyValues));
>>        
>> $featureService->UpdateFeatures($featureResId, $commands, false);
>> 
>> Could someone tell me if there is something I am missing, or if there 
>> is some way to find out why this is not working?
>> 
>> Thanks,
>> 
>> Matt
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Request-for-help-inserting-new-row-into-SDF-file.-
> tf3303740s16610.html#a9195532
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Request-for-help-inserting-new-row-into-SDF-file.-tf3303740s16610.html#a9226528
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list