查看: 890|回复: 2
|
有谁懂怎样 link ms-access database using ASP.net? (问题决绝了)
[复制链接]
|
|
我试过随着 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 编辑 ] |
|
|
|
|
|
|
|
发表于 14-3-2006 09:14 AM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 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 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|