lr.log("Create new Copmmand");
String connectionString_1000;
connectionString_1000 = "Data Source=192.168.11.172;Initial Catalog= EPMS_0714 ;User ID=sa";
SqlConnection SqlConnection_1000 = new SqlConnection(connectionString_1000);
SqlConnection_1000.Open();
SqlCommand SqlCommand_500 = new SqlCommand();
SqlCommand_500.Connection = SqlConnection_1000;
SqlCommand_500.CommandType = CommandType.Text;
//lr.log("查询MapGrid中ProjectID为"+lr.eval_string("752")+"的MapID");
SqlCommand_500.CommandText = "select ID from MapGrid where ProjectID =" + lr.eval_string("{NewParam}") + "";
List<int> mapids = new List<int>();
List<int> layerids = new List<int>();
SqlDataReader reader = SqlCommand_500.ExecuteReader();
while (reader.Read())
{
int ID11 = (int)reader[0];
mapids.Add(ID11);
}
reader.Close();
lr.start_transaction("delete");
// lr.log("删除DataState中ProjectID为"+lr.eval_string("752")+"中的MapID的记录");
for (int i=0; i<mapids.Count; ++i)
{
int IDmap = mapids;
SqlCommand_500.CommandText = "DELETE FROM DataState where MapID=" + IDmap.ToString();
SqlCommand_500.ExecuteNonQuery();
}
lr.end_transaction("delete", lr.AUTO);
SqlCommand_500.CommandText = "select ID from Layer ";
reader = SqlCommand_500.ExecuteReader();
while (reader.Read())
{
int ID11 = (int)reader[0];
layerids.Add(ID11);
}
reader.Close();
[ 本帖最后由 zhuxiaoyan003 于 2010-1-6 16:28 编辑 ]作者: zhuxiaoyan003 时间: 2010-1-6 17:11
希望大家帮帮忙啊……不要总飘过作者: zhuxiaoyan003 时间: 2010-1-7 08:38
看的人多,回的人没有
是我写的不清楚还是各位也无法解决呢?作者: zhuxiaoyan003 时间: 2010-1-21 17:15
终于解决了参数化的问题
将select next row 设为unique,update value on 设置为 each iteration when out of value 设置为continue in a cyclic manner
就能在场景中跑过去了作者: zhuxiaoyan003 时间: 2010-1-21 17:16
可是生成结果的错误还没解决。不知道怎么回事
如果我研究出来了,会再写上来
如果有知道的,麻烦指点一下