Saturday, February 25, 2012

Silverlight RIA Services - Records count mismatch

Team,

I was working with a Silverlight application which was fetching SQL data using RIA services. While coding I observed that the total number of records in the SQL data table is not matching with the records count in the Silverlight application.


After several debugging hours I found out a very crucial behavior.


All these tables that are coming in through RIA services need a primary key. If there is no primary key then the RIA services might try to pick a unique column on its own. But it’s always a hit and miss. So it’s better to make sure every table even every view that is being fetched through RIA services must have a “Unique Key Field”.


Hope this helps and saves time.


Happy Coding!

Cheers
Anand

Thursday, February 23, 2012

Labeling in ArcIMS – Avoid Duplicate Labels when there is a JOIN

I came across a scenario where I am supposed to link the GIS features with external tables in ArcIMS. This was a one-to-many relationship, which means for one GIS feature there were many external records.
We want to label this GIS features, but when we tried labeling, it was showing duplicate labels, because of the one-to-many relationship established with the external records.
To control this we used the ArcIMS AXL syntax like shown below.
<SIMPLELABELRENDERER field= "AYED.env_field_sample_loc_point.LOCID" howmanylabels ="one_label_per_shape" labelbufferratio="3.0">
<TEXTSYMBOL antialiasing="true" font="Verdana" fontsize="8" glowing="255,255,255" interval="20"/>
</SIMPLELABELRENDERER>

Note down the tag “
labelbufferratio”. This helps to remove those duplicate labels.
Happy Coding !

All Blogs so far ...