PDA

View Full Version : اشکال در ارتباط با پایگاه داده اکسس



hossein fatemi
یک شنبه 05 شهریور 1385, 08:00 صبح
وقتی اتصال به پایگاه داده رو باز می کنم و برنامه رو اجرا می کنم این پیغامو می ده
Server Error in '/WebApplication3' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\Hossein Meizari\My Documents\db1.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:\Documents and Settings\Hossein Meizari\My Documents\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

Source Error:


Line 30: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 31: 'Put user code to initialize the page here
Line 32: OleDbConnection1.Open()
Line 33:
Line 34:


Source File: c:\inetpub\wwwroot\WebApplication3\WebForm1.aspx.v b Line: 32

Stack Trace:


[OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\Hossein Meizari\My Documents\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvid er()
System.Data.OleDb.OleDbConnection.Open()
WebApplication3.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication3\WebForm1.aspx.v b:32
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

mahdi_negahi
یک شنبه 05 شهریور 1385, 10:19 صبح
عزیز جان این خط را به web.config اضافه کن مشکل حل می شود
در زیر کد زیر
کد:

<authentication mode="Windows" />
این را اضافه کن
کد:

<identity impersonate = "true"/>