- 注册时间
 - 2013-7-5
 - 最后登录
 - 2013-7-5
 - 阅读权限
 - 10
 - 积分
 - 5
 - 精华
 - 0
 - 帖子
 - 1
  
 
 
 
  
 | 
在添加新数据保存没有反应 通过超链接测试出现“调用的目标发生了异常”错误 
 
- private static void SetArgs(string sql, Hashtable args, IDbCommand cmd)
 
 - {
 
 - MatchCollection ms = Regex.Matches(sql, @"@\w+");
 
 - int i = 1;
 
 - foreach (Match m in ms)
 
 - {
 
 - string key = m.Value;
 
 - string newKey = "@P" + i++;
 
 - sql = sql.Replace(key, "?");
 
 - Object value = args[key];
 
 - if (value == null)
 
 - {
 
 - value = args[key.Substring(1)];
 
 - }
 
 - cmd.Parameters.Add(new OleDbParameter(newKey, value));
 
 - }
 
 - cmd.CommandText = sql; 
 
 - }
 
  复制代码 
请教一下高手 应做如何调整 |   
 
  
 |