[mapguide-users] can't update and delete from feature source but insert works

Jonathan Manafi jonathan.manafi at cctechnol.com
Fri Apr 4 12:32:33 EDT 2008


After all this head-scratching and the blank stares, it turned out to be 
two unused quotes. Ughhh, that's aggravating. :-)

Thank you for your quick, extremely helpful response


Kenneth, GEOGRAF A/S wrote:
> The $ID gets replaced by PHP, but FDO SQL requires that strings are 
> quoted.
> Change the line to:
> |$filter = "KEY = '$ID'";
> |
> It is a bit annoying because you have to get the column type before 
> you can do the query.
> Regards, Kenneth, GEOGRAF A/S
>   
>
>
> J Manafi skrev:
>> Does anyone know...with an MgDeleteFeatures(or perhaps 
>> MgUpdateFeatures) command, does the filter string have to be of a 
>> certain type? For instance, we have features stored with a unique KEY 
>> value. It used to be of type 'Int32', and it seemed that 
>> DeleteFeatures was working back then. But then I changed the KEY 
>> value to type 'String' to make it more dynamic, and that seems to be 
>> when this breakdown started happening.
>>
>> Our filter string looks like this: |$filter = "KEY = $ID";|
>>
>> Should the fact that $ID is a string matter at all?
>>
>>     J Manafi wrote:
>>     I have not received any error messages. All of our php script
>>     files execute fine and return all the expected values through
>>     FireBug as if they are executing correctly. I am also not seeing
>>     your issue of not being able to insert anymore, because I have
>>     now tried that, where I have an UpdateFeatures followed by an
>>     InsertFeatures, and all of the features are getting inserted
>>     every time but not updated. I have taken the advice of the other
>>     threads and tried closing any and all featureReaders I could
>>     find, but that has had no effect.
>>     Just for reference, I am using MG 1.2 with bundled php environment.
>>
>>     Does anyone have any more suggestions?
>>
>>     Thanks in advance for any help you give.
>>
>>         Ismael Cams wrote:
>>         Hello, I started a thread on the forum yesterday similar to
>>         what you are describing. Did you get any error messages (I
>>         get an MgResourceBusyException) ? After I try to delete or
>>         update a feature I also not succeed anymore to insert
>>         features. Only after a restart of mgserver I can insert
>>         features again. My code was working fine with MGOS 1.2.
>>
>>             J Manafi wrote:
>>             I am having a very similar problem. We are digitizing
>>             layers and storing temporary feature sources in the
>>             session repository, and I, too, cannot delete or update
>>             our temp. layers, but I can insert new features. I
>>             checked the readonly flag, but it was already set to
>>             FALSE, and my attempts at updating features are very
>>             similar programatically to the posts I have already come
>>             across. We are able to do a mass deletion, however, and
>>             delete all temporary layers from the map, but I have been
>>             unsuccessful in trying to delete a singular feature from
>>             specific layers. Has anyone been able to make any
>>             progress on this topic?
>>
>>                 mitcha wrote:
>>                 hello everybody, i need help!!! i try tu update and
>>                 delete a feature source (sdf file), but it doesn't
>>                 work! instead inserting new data into feature source
>>                 work very well! i searched for solutions in this
>>                 forum and i found some similar problems. So I first
>>                 tried to set the readonly flag of the schema to false
>>                 with the mapagent. now the xml presentation looks
>>                 like this: OSGeo.SDF File
>>                 %MG_DATA_FILE_PATH%userPoints2.sdf ReadOnly FALSE But
>>                 it doesn't work!!! furthermore i tried to set the
>>                 identity property to readonly="false" with the help
>>                 of Fdo2Fdo. But it doesn't work, too. i always get an
>>                 error message. Could this be my fault? can i change
>>                 this value of the identity property? . . .
>>
>>
>> ------------------------------------------------------------------------
>> View this message in context: Re: can't update and delete from 
>> feature source but insert works 
>> <http://www.nabble.com/can%27t-update-and-delete-from-feature-source-but-insert-works-tp12233926s16610p16492944.html>
>> Sent from the MapGuide Users mailing list archive 
>> <http://www.nabble.com/MapGuide-Users-f14845.html> 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
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080404/fa9552c9/attachment.html


More information about the mapguide-users mailing list