ThinkGeo.com    |     Documentation    |     Premium Support

How can i append data to feature

Hi again,



I load data to a "MsSql2008FeatureLayer" from a sql table

how can i append data from another sql table to this Feature??



Thanks

Hi Alireza,



Hope the blow codes will help on your issue:


DataTable table = sql2008Layer.QueryTools.ExecuteQuery("select * from UsersData");
            foreach (var item in features)
            {
                foreach (DataRow tableItem in table.Rows)
                {
                    foreach (DataColumn columnItem in table.Columns)
                    {
                        item.ColumnValues.Add(columnItem.ColumnName, tableItem[columnItem.ColumnName].ToString());
                    }
                }
            }

Please let us know if any questions.

Thanks,

Troy