佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 891|回复: 2

有谁懂怎样 link ms-access database using ASP.net? (问题决绝了)

[复制链接]
superman00 该用户已被删除
发表于 13-3-2006 11:04 PM | 显示全部楼层 |阅读模式
我试过随着 an example from  http://aspalliance.com/429
但是我发现 an error saying :

Server Error in '/MyApplication1' Application.
The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\MyApplication1\xyz.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\MyApplication1\xyz.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

Source Error:


Line 58:         Dim ds As New DataSet
Line 59:
Line 60:         adp.Fill(ds, "tblxyz")
Line 61:
Line 62:         DataGrid1.DataSource = ds


Source File: C:\Inetpub\wwwroot\MyApplication1\WebForm1.aspx.vb    Line: 60

Stack Trace:


[OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\MyApplication1\xyz.mdb'.  It is already opened exclusively by another user, or you need permission to view its data.]
   System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
   System.Data.OleDb.OleDbConnection.InitializeProvider()
   System.Data.OleDb.OleDbConnection.Open()
   System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   MyApplication1.WebForm11.DataBind1() in C:\Inetpub\wwwroot\MyApplication1\WebForm1.aspx.vb:60
   MyApplication1.WebForm11.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\MyApplication1\WebForm1.aspx.vb:47
   System.Web.UI.Control.OnLoad(EventArgs e)
   System.Web.UI.Control.LoadRecursive()
   System.Web.UI.Page.ProcessRequestMain()

请帮我解决以上的 error. And also 给我一些 example(source code) 参考.

谢谢~!

[ 本帖最后由 superman00 于 14-3-2006 04:07 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 14-3-2006 09:14 AM | 显示全部楼层
回复

使用道具 举报

superman00 该用户已被删除
 楼主| 发表于 14-3-2006 04:06 PM | 显示全部楼层

问题决绝了 谢谢~! max5007

security permittion (database file) 问题

method:
1. folder option:>view> files and folders
不要选 Use sample file sharing

2. right click database file (save file *.mdb) > security> 选 all user (administrator, anyone use ..etc) all enable permition.

::>> 问题决绝了

谢谢~! max5007
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 14-11-2024 04:44 PM , Processed in 0.101458 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表