用c#.net编写BBS论坛 找不到类型或命名空间名称“SqlParameter”(是否缺少 using 指令或程序集引用?)
usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.We...
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
/// <summary>
/// SqlHelper 的摘要说明
/// </summary>
public class SqlHelper
{
public static readonly string ConnectionStringLocalTransaction = ConfigurationManager.ConnectionString["LocalSqlServer "].ConnectionString;
private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
public static SqlParameter[] GetCachedParameters(string cachekey)
{
SqlParameter[] cachedParms = (SqlParameter[])parmCache[cachekey];
if (cachedParms == null)
return null;
SqlParameter[] clonedParms = new SqlParameter[cachedParms.Length];
for (int i = 0, j = cachedParms.Length; i < j; i++)
clonedParms[i] = (SqlParameter)((ICloneable)cachedParms[i]).Clone();
return clonedParms;
}
public SqlHelper()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
}
求救大师 展开
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
/// <summary>
/// SqlHelper 的摘要说明
/// </summary>
public class SqlHelper
{
public static readonly string ConnectionStringLocalTransaction = ConfigurationManager.ConnectionString["LocalSqlServer "].ConnectionString;
private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
public static SqlParameter[] GetCachedParameters(string cachekey)
{
SqlParameter[] cachedParms = (SqlParameter[])parmCache[cachekey];
if (cachedParms == null)
return null;
SqlParameter[] clonedParms = new SqlParameter[cachedParms.Length];
for (int i = 0, j = cachedParms.Length; i < j; i++)
clonedParms[i] = (SqlParameter)((ICloneable)cachedParms[i]).Clone();
return clonedParms;
}
public SqlHelper()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
}
求救大师 展开
4个回答
展开全部
加上:
using System.Data.SqlClient;
using System.Data.SqlClient;
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
using System.Data.SqlClient;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
using System.Data.SqlClient;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
加上:
using System.Data.SqlClient
using System.Data.SqlClient
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询