上下文中不存在名称“SqlHelper”?
using System;
using System.Data;
using System.Text;
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.Data.SqlClient;
public class NewsManager
{
private const string SQL_INSERT_NEWSINFO = "INSERT INTO newsinfo VALUES(@title,@data,@date,@imageurl,@category) ";
private const string PARM_NEWS_TITLE = "@title ";
private const string PARM_NEWS_DATA = "@data ";
private const string PARM_NEWS_DATE = "@date ";
private const string PARM_NEWS_CATEGORY = "@category ";
private const string PARM_NEWS_IMAGEURL = "@imageurl ";
private static SqlParameter[] GetParameters()
{
//这句的SqlHelper有问题。
SqlParameter[] parms = SqlHelper.GetCachedParameters(SQL_INSERT_NEWSINFO);
if (parms == null)
{
parms = new SqlParameter[]{
new SqlParameter(PARM_NEWS_TITLE,SqlDbType.NVarChar,20),
new SqlParameter(PARM_NEWS_DATA,SqlDbType.NVarChar,500),
new SqlParameter(PARM_NEWS_DATE,SqlDbType.DateTime),
new SqlParameter(PARM_NEWS_IMAGEURL,SqlDbType.NVarChar,50),
new SqlParameter(PARM_NEWS_CATEGORY,SqlDbType.NVarChar,20) };
//还有这句的SqlHelper。
SqlHelper.CachParameters(SQL_INSERT_NEWSINFO, parms);
}