C#---xml带参数查询

来源:互联网 发布:乐视手机mac 编辑:程序博客网 时间:2024/05/19 03:43
using System.Collections;Hashtable ht = new Hashtable();ht["buildingID"] = bid;DataTable tb = new DataTable();tb = IbatisHelper.ExecuteQueryForDataTable("getBuildingVertex2", ht);

xml

<select id="getBuildingVertex2" parameterClass="hashtable">    select CX, CY    from tbGridDem, tbBuildingGrid3D     where tbBuildingGrid3D.GXID = tbGridDem.GXID    and tbBuildingGrid3D.GYID = tbGridDem.GYID     and tbBuildingGrid3D.GZID = 1    and tbBuildingGrid3D.BuildingID = '$buildingID$'</select>