Hi ben,
I'm sorry that I found again a new problem with Postgre Layers.
I tried the example "ExecuteASQLQuery" with a own shapelayer and it is going (but not on an indexed column).
If I try a SQL-Request to a Postgrelayer I get the error -->
Executing sql queries is not supported and the user should always check the CanExecuteSqlQueries to ensure the FeatureSource support it before calling.
I would be thankfull for a hint.
Regards Jörg
Protected Sub btnExecute_Click(ByVal sender As Object, ByVal e As EventArgs) 'Dim sqlLayer As ShapeFileFeatureLayer = DirectCast(Map1.StaticOverlay.Layers("MAZLayer"), ShapeFileFeatureLayer) Dim sqllayer As PostgreSqlFeatureLayer = DirectCast(Map1.StaticOverlay.Layers("MAZLayer"), PostgreSqlFeatureLayer) sqllayer.Open() Dim dataTable As DataTable = sqllayer.QueryTools.ExecuteQuery(SQLTextBox.Text) sqllayer.Close() FeaturesGridView.DataSource = dataTable FeaturesGridView.DataBind() End Sub
475-Unser_Test.aspx.vb (12.3 KB)
477-Unser_Test.aspx.designer.vb (6.41 KB)