Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Could not display a column in Access 2000 nwind.mdb in a listbox using ole DataAdapter, Connection and dataset controls (http://www.velocityreviews.com/forums/t68864-could-not-display-a-column-in-access-2000-nwind-mdb-in-a-listbox-using-ole-dataadapter-connection-and-dataset-controls.html)

yma 12-15-2003 02:55 PM

Could not display a column in Access 2000 nwind.mdb in a listbox using ole DataAdapter, Connection and dataset controls
 
Hi,

I tried to use a listbox to display a column in MS Access 2000 nwind.mdb by
using ole DataAdapter, Connection and dataset controls. But I got "It is
already opened exclusively by another user, or you need permission to view
its data." I put ole DataAdapter, Connection and dataset controls and fill
in the properties of the listbox. The only code I have is
OleDbDataAdapter1.Fill(DataSet11, "employees") in page_load sub. How can I
fix it?

By the way, I can use these objects in code to load data. I tried these
controls in window form, they worked. The only problem is when I use them
in a web form, the line OleDbDataAdapter1.Fill(DataSet11, "employees")
caused error.

Thank you a lot.
Chris

Below is the error message:

Server Error in '/Web420' Application.
----------------------------------------------------------------------------
----

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

Source Error:

Line 204: OleDbDataAdapter1.Fill(DataSet11, "employees")

Source File: c:\inetpub\wwwroot\web420\WebForm1.aspx.vb Line: 204

Stack Trace:


[OleDbException (0x80004005): The Microsoft Jet database engine cannot open
the file 'C:\web420\Nwind.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()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(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)
web420.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\web420\WebForm1.aspx.vb:204
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

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




Natty Gur 12-16-2003 06:20 PM

Re: Could not display a column in Access 2000 nwind.mdb in a listbox using ole DataAdapter, Connection and dataset controls
 
Hi,

It's probably security settings. Follow that article:
http://www.campus.ncl.ac.uk/database...aspdotnet.html

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT. The time now is 06:12 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.