[mapguide-users] Get the key field of ODBC table

miansi AndreiSinelnikov at SierraSystems.com
Fri Feb 27 15:43:36 EST 2009



Hello Jackie,

I stuggled presenting information from SQL 2008 View with JOINs and being
able to select features on the map. Looks like it is because of missing
Identity property (please see Brent's response):

http://n2.nabble.com/SQL-2008.-View-with-JOINS.-Not-able-to-select-features-on-the-layer.-tp2356197p2396390.html

I wonder if is there a way to override Identity property programmatically?
Can you help me on that one?

I am creating Layers and updating Map through xml already. So, I was
thinking if it is possible to reset Identity attribute for the FeatureSource
before I will create my Layer and update Map in code?


Thank you,

Andrei



Jackie Ng wrote:
> 
> Get the MgClassDefinition of the layer, then call its
> GetIdentityProperties() which will return a collection of identity
> properties (fields/columns)
> 
> To get the MgClassDefinition, call the GetClassDefinition() method of
> MgFeatureService, the MgLayer has GetFeatureSourceId() and
> GetFeatureClassName() methods to give you the necessary parameters.
> 
> - Jackie
> 
> 
> Matteo wrote:
>> 
>> Hi,
>>   in my map I have some layer that retriew data from MSSQL table
>> (lat,long fields). Now I must be create a function that create an XLS
>> sheets (excel) with table data for each object that the user select on
>> map. For do this i need to get the table key field of selected object.
>> I work with ASP.NET and MG2.0.2
>> Someone can help me?
>> Thanks
>> Matteo
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Get-the-key-field-of-ODBC-table-tp2389826p2398028.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list