[求助]为什么我的mdac无效了!怎么办?
原来配置好了运行环境,昨天安装了后
我向数据库插入一条记录,竟然说找不到mdac请安装组件
我于是重新安装了mdac,但是不起作用!
请教各位大侠!
就这么简单的几句话
sub InsertAdUser(sender as object,e as eventargs)
dim StrSql as string
StrSql = "Insert Into User(UserName,UserPwd,UserRate) Values('" & NewAdmin.Text &"','" & NewAdminPa.Text & "'," & Cint(AdClass.SelectedItem.Value) & ")"
dim Cmd as new OleDbCommand(StrSql,conn)
conn.open()
Cmd.executeNonQuery()
conn.close()
Message.Text = "已经成功添加!"
end sub
错误显示:
[COMException (0x8007007f): 找不到指定的程序。]
System.(Guid rclsid, IntPtr pUnkOuter, Int32 dwClsContext, Guid riid) +0
System.Data.OleDb.OleDbConnection.CreateInstanceDataLinks() +172
System.Data.OleDb.OleDbConnection.CreateInstanceMDAC() +93
[InvalidOperationException: .Net 数据 OLE DB 提供程序(System.Data.OleDb)要求 Microsoft 数据访问组件(MDAC)。请安装 Microsoft 数据访问组件(MDAC) 2.6 或更高版本。]
System.Data.OleDb.OleDbConnection.CreateInstanceMDAC() +127
System.Data.OleDb.OleDbConnection.GetObjectPool() +177
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr) +13
System.Data.OleDb.OleDbConnection.Open() +203
ASP.admin_add_aspx.InsertAdUser(Object sender, EventArgs e) in E:\cartosoft\system\admin_add.aspx:18
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1258