日期:2014-05-18  浏览次数:20785 次

求指教~
自己写了个access的简单记事本,调不过去
请大虾们帮解决下
新手
语言请简单:)
**************************
报错提示:
“/MsgBoard”应用程序中的服务器错误。
--------------------------------------------

编译错误  
说明:   在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。  

编译器错误信息:   CS0103:   当前上下文中不存在名称“DbProviderFactories”

源错误:

 

行   25:                   string   strConnection   =   @ "Provider=Micorsoft.Jet.Ole.4.0;Data   Source= ";//设定连接字符串
行   26:                   strConnection   +=   Server.MapPath( ".\\App_Data\\MsgBoard.mdb ");
行   27:                   System.Data.Common.DbProviderFactory   dbProviderFactory   =   DbProviderFactories.GetFactor( "System.Date.OleDb ");
行   28:                   DbConnection   dbConnection   =   dbProviderFactory.CreateConnection();
行   29:                   dbConnection.ConnectionString   =   strConnection;
 

源文件:   d:\My   Documents\Visual   Studio   2005\WebSites\MsgBoard\Default.aspx.cs         行:   27  


*************************************
.cs的源码如下
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;

public   partial   class   _Default   :   System.Web.UI.Page  
{
        protected   void   Page_Load(object   sender,   EventArgs   e)
        {

        }
        protected   void   Button1_Click(object   sender,   EventArgs   e)
        {
                string   strName   =   this.tbName.Text;
                string   strSubject   =   this.tbSubject.Text;
                string   strMsg   =   this.tbMsg.Text;
                string   strIP   =   Request.UserHostAddress.ToString();
                string   strDate   =   System.DateTime.Now.ToString();
                //插入数据库
                string   strConnection   =   @ "Provider=Micorsoft.Jet.Ole.4.0;Data   Source= ";//设定连接字符串
                strConnection   +=   Server.MapPath( ".\\App_Data\\MsgBoard.mdb ");
                System.Data.Common.DbProviderFactory   dbProviderFactory   =   DbProviderFactories.GetFactor( "System.Date.OleDb ");
                DbConnection   dbConnection   =   dbProviderFactory.CreateConnection();
&nb