[mapguide-users] UpdateFeatures
Ivan Milicevic
Ivan.Milicevic at supranet.hr
Mon Mar 2 05:54:49 EST 2009
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
More information about the mapguide-users
mailing list