Hello, I´m loading a layer with MsSql2008FeatureLayer , it woks fine, but I want to add a filter using WhereClause, it sends me an error {"Incorrect syntax near '='."} , the column name it´s correct, am I doing something wrong ?? Can anyone help me please??? here is my code, thanks in advance!!
string strLayerName = "S_" + strIdCateg;
string connectString = MapasConstants.CDBConexion ;
MsSql2008FeatureLayer sql2008Layer = new MsSql2008FeatureLayer(connectString, "Points", "IdPoint");
sql2008Layer.WhereClause = "IdCateg =" + strIdCateg;
sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1;
sql2008Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add(strLayerName, sql2008Layer);