Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]General
    [Expand]Map Image Data
    [Expand]GIS Data
    [Collapse]Vector Data
     [Collapse]Providing Data
       How to: Load Data from a Shapefile
       How to: Load Data from a KML File
       How to: Load Data from a SVG File
       How to: Load Data from a SQL Geometry Datasource
       How to: Manually Generate Vector Items
       How to: Manually Generate Vector Items from WKT
       How to: Manually Generate Bubble Chart Items
       How to: Manually Generate Pie Chart Items
       How to: Automatically Generate Vector Items from a Datasource
       How to: Automatically Generate Bubble Charts Items from a Datasource
       How to: Automatically Generate Pie Charts Items from a Datasource
       How to: Provide Additional Property Values from a Data Source Using Property Mappings
       How to: Aggregate Vector Items Using a Clusterer
       How to: Implement a Custom Clusterer
     [Expand]Colorize Data
     [Expand]Customize Data Appearance
    [Expand]Printing and Exporting
   [Expand]End-User Features
   [Expand]Product Information
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Load Data from a SQL Geometry Datasource

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T175898.

To load data from a SQL Geometry data source, do the following.

  1. Create a SqlGeometryDataAdapter object.
  2. Specify its SqlGeometryDataAdapter.ConnectionString, SqlGeometryDataAdapter.SqlText and SqlGeometryDataAdapter.SpatialDataMember properties.
  3. Assign this object to the VectorItemsLayer.Data property.
Note

All data table field values loaded from the database will be provided as attributes for each SqlGeometryItem object generated using SqlGeometryDataAdapter.

How would you rate this topic?​​​​​​​