2 qq 34418970 qq_34418970 于 2016.05.05 15:18 提问

为什么是参数格式不正确?
 string whereClause = (_ResultLayer as IFeatureLayerDefinition).DefinitionExpression;
            string tableName = StaticSystemAOClass.AOComm.GetDataSetName(_ResultLayer.FeatureClass);

            int selectID =gvMain.SelectedRowsCount;

            string sqlID = string.Format("delete * from {0} where @OID@={1}" ,tableName, selectID);
            if (selectID > 0)
            {
                this.gvMain.DeleteRow(int.parse(sqlID));
                this.gvMain.DeleteSelectedRows();
                MessageBox.Show("删除成功");
            }
            else
            {
                MessageBox.Show("请选中要删除的行");
            }
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!