[mapguide-users] UpdateFeatures

Zac Spitzer zac.spitzer at gmail.com
Tue Mar 3 02:43:44 EST 2009


cool, can you file a new bug? it should be raising an exception!

z

2009/3/3 Ivan Milicevic <Ivan.Milicevic at supranet.hr>:
> Zac,
>
> I have found error. Sdf file was marked as READ ONLY. Now, everything works perfectly. Thank's a lot for your time.
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
> - Show quoted text -
> Sent: Monday, March 02, 2009 12:26 PM
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] UpdateFeatures
>
> it's gonna take some one who knows C++ and the mapguide
> code base to do this..
>
> out of interest which provider where you using?
>
> this should raise an exception right?
>
> 2009/3/2 Ivan Milicevic <Ivan.Milicevic at supranet.hr>:
>> So, I'll wait till 2.1 release.
>>
>> Thanks a lot, I've spend a whole weekend to solve it but without exception or error code it's impossible.
>>
>> Thank's again.
>>
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
>> Sent: Monday, March 02, 2009 12:07 PM
>> To: MapGuide Users Mail List
>> Subject: Re: [mapguide-users] UpdateFeatures
>>
>> hmm, these are both quite critical bugs IMHO...
>>
>> we are talking about potential dataloss here,
>>
>> should be a blocker for 2.1, I've updated the ticket for be high
>>
>> http://trac.osgeo.org/mapguide/ticket/649
>>
>> z
>>
>> 2009/3/2 Ivan Milicevic <Ivan.Milicevic at supranet.hr>:
>>> Strange, i can get GetValue() but i can get name and it's "0".
>>>
>>> .GetItem(0).Name is "0"
>>>
>>> and
>>>
>>> GetItem(0).GetPropertyType() is "9"
>>>
>>>
>>> -----Original Message-----
>>> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
>>> Sent: Monday, March 02, 2009 11:49 AM
>>> To: MapGuide Users Mail List
>>> Subject: Re: [mapguide-users] UpdateFeatures
>>>
>>> same as result.GetItem(0).GetPropertyType() ?
>>>
>>> z
>>>
>>> 2009/3/2 Ivan Milicevic <Ivan.Milicevic at supranet.hr>:
>>>> Value is 9
>>>>
>>>> -----Original Message-----
>>>> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
>>>> Sent: Monday, March 02, 2009 11:46 AM
>>>> To: MapGuide Users Mail List
>>>> Subject: Re: [mapguide-users] UpdateFeatures
>>>>
>>>> what is the value of  result.GetItem(0).GetValue() ?
>>>>
>>>> On Mon, Mar 2, 2009 at 4:46 PM, Ivan Milicevic
>>>> <Ivan.Milicevic at supranet.hr> wrote:
>>>>> Hello Zac, hello group
>>>>>
>>>>> I'm havig the same problems as George has. Tried
>>>>> result.GetItem(0).GetValue() and resoult is 9. Can you help me? I'm
>>>>> really suffering to create this "easy to do" feature.
>>>>>
>>>>> The following code does it well, no execption, no errors but no deleted
>>>>> feature as well.
>>>>>
>>>>> PLease, be note that Filter string is fine.
>>>>>
>>>>> Thanx a lot.
>>>>>
>>>>>
>>>>>
>>>>>        string TIMgisUser =
>>>>> System.Configuration.ConfigurationManager.AppSettings["TIMgisUser"];
>>>>>        MapGuideApi.MgInitializeWebTier(@"C:\program
>>>>> files\MapguideOpenSource2.0\WebServerExtensions\www\webconfig.ini");
>>>>>        MgUserInformation userInfo = new
>>>>> MgUserInformation("Administrator", "" +
>>>>> System.Configuration.ConfigurationManager.AppSettings["mgP"] + "");
>>>>>        MgSite site = new MgSite();
>>>>>        site.Open(userInfo);
>>>>>        String mgSessionId = site.CreateSession();
>>>>>
>>>>>        MgUserInformation userInfoNew = new
>>>>> MgUserInformation(mgSessionId);
>>>>>        MgSiteConnection siteConnection = new MgSiteConnection();
>>>>>        siteConnection.Open(userInfoNew);
>>>>>
>>>>>        MgResourceService resourceService =
>>>>> siteConnection.CreateService(MgServiceType.ResourceService) as
>>>>> MgResourceService;
>>>>>        MgFeatureService featureService =
>>>>> siteConnection.CreateService(MgServiceType.FeatureService) as
>>>>> MgFeatureService;
>>>>>        MgResourceIdentifier resId = new
>>>>> MgResourceIdentifier("Library://PROJEKTI/ZLZ/PODACI/DIONICE.FeatureSourc
>>>>> e");
>>>>>        MgFeatureCommandCollection commands = new
>>>>> MgFeatureCommandCollection();
>>>>>        MgDeleteFeatures deleteCmd = new MgDeleteFeatures("DIONICE",
>>>>> "(FeatId='1')");
>>>>>        commands.Add(deleteCmd);
>>>>>
>>>>>        featureService.UpdateFeatures(resId, commands, false);
>>>>>        string re = featureService.UpdateFeatures(resId, commands,
>>>>> false).GetItem(0).GetPropertyType().ToString();
>>>>>
>>>>>        Response.Write(featureService.TestConnection(resId));
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: mapguide-users-bounces at lists.osgeo.org
>>>>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
>>>>> Sent: Friday, August 01, 2008 3:06 AM
>>>>> To: MapGuide Users Mail List
>>>>> Subject: Re: [mapguide-users] MG 1.2 vs 2.0.1
>>>>>
>>>>> yep...it does fail silently, which is really annoying.. it should just
>>>>> raise an exception
>>>>>
>>>>> On Fri, Aug 1, 2008 at 4:16 AM, George McLean <gmclean at gorge.net> wrote:
>>>>>> No I am not. Does this ignore the error message and process the update
>>>>>> somehow?
>>>>>>
>>>>>> Zac Spitzer wrote:
>>>>>>>
>>>>>>> Are you checking the result as bellow
>>>>>>>
>>>>>>> result=featureService.UpdateFeatures(resourceID, fCommand, false);
>>>>>>>
>>>>>>> if (result.GetItem(0).GetPropertyType() eq 9)
>>>>>>>    result.GetItem(0).GetValue() // Silent FDO error messages!!!!
>>>>>>>
>>>>>>> z
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Aug 1, 2008 at 2:14 AM, Zac Spitzer <zac.spitzer at gmail.com>
>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> can you post some code to demonstrate the problem?
>>>>>>>>
>>>>>>>> On Fri, Aug 1, 2008 at 2:05 AM, George McLean <gmclean at gorge.net>
>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I am a bit stuck in upgrading to 2.0.1 mainly due to the issues
>>>>> with
>>>>>>>>> adding
>>>>>>>>> data to feature sources discussed in this thread:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>> http://www.nabble.com/Please-try-your-operation-later-as-the-resource-wa
>>>>> s-busy-to16392736.html#a18556960
>>>>>>>>>
>>>>>>>>> My immediate issue is that I have a client that would really like
>>>>> to us
>>>>>>>>> FF
>>>>>>>>> 3.0 with my application. I see that either I need to find a way to
>>>>> apply
>>>>>>>>> the
>>>>>>>>> fixes made in 2.0 for FF to 1.2 or find a way around the issues
>>>>> with
>>>>>>>>> updating feature data.
>>>>>>>>>
>>>>>>>>> I could look at the code for MG 1.2 and apply the changes made to
>>>>> 2.0
>>>>>>>>> with
>>>>>>>>> some guidance on where to start but I think I would rather find a
>>>>> fix
>>>>>>>>> for MG
>>>>>>>>> 2.0.
>>>>>>>>>
>>>>>>>>> Any suggestions would be appreciated.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> George McLean
>>>>> _______________________________________________
>>>>> mapguide-users mailing list
>>>>> mapguide-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Zac Spitzer -
>>>> http://zacster.blogspot.com
>>>> +61 405 847 168
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Zac Spitzer -
>>> http://zacster.blogspot.com
>>> +61 405 847 168
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>> Zac Spitzer -
>> http://zacster.blogspot.com
>> +61 405 847 168
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> 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
>



-- 
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-users mailing list