Error AsyncSqlGeospatialDataReader

2 posts, 0 answers
  1. Renier Pretorius
    Renier Pretorius avatar
    46 posts
    Member since:
    Apr 2010

    Posted 14 Jul 2015 Link to this post

    Hi,

     

    I have successfully used the AsyncSqlGeospatialDataReader to read shape data stored in a geometry column in SQL. I first read the geometry objects into a local collection and then assign that collection to the reader

    var readerRail = new Telerik.Windows.Controls.Map.SqlGeospatialDataReader();
    readerRail.Source = RailShapes;
    readerRail.ToolTipFormat = "{SegmentLabel}";
    readerRail.GeospatialPropertyName = "ShapeWKT";
    readerRail.PreviewReadCompleted += readerRail_PreviewReadCompleted;
     

    However, while this has worked on three previous collections on this specific one I get a "Non-static method requires a target" error. It seems as if some of the shape data must then be an issue but I have no idea where to start looking.

     PS: SQL Management studio can query the data and display it

     

  2. Renier Pretorius
    Renier Pretorius avatar
    46 posts
    Member since:
    Apr 2010

    Posted 14 Jul 2015 in reply to Renier Pretorius Link to this post

    Hi,

    Please ignore. I found my error. A bit embarrassed for not picking it up before posting. I am merging some database business object with shape data from shapefiles imported into SQL Server. Not all business objects where matched, hence the Geospatial Property of some was null causing the error. 

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top