Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Database open connection error

Status
Not open for further replies.

kafmil

Technical User
Jul 15, 2002
71
AU
I am writing a program in ASP.NET which uses an Access Database. It all works fine except that when I perform an update or insert to the database. The next time I try to open a connection (OLEDbConnection.Open(connectionstring)) to the database I get a "System.Data.OleDb.OleDbException: Unspecified error"
with the following stack trace.

[OleDbException (0x80004005): Unspecified error]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
SupaNovaMaint.clsCommon.GetDataReader(String istrConnectionString, String istrSQL, OleDbConnection& oobjConn, OleDbDataReader& oobjDataReader, String& ostrError, OleDbTransaction& oobjTransaction) in C:\projects\SUPANOVA WEBSITE\Source\web\components\common.vb:211
SupaNovaMaint.maintain.SetSheet(Int32 iintCarNumber) in C:\projects\SUPANOVA WEBSITE\Source\web\maintenance\car.aspx.vb:305
SupaNovaMaint.maintain.dgCars_UpdateCommand(Object source, DataGridCommandEventArgs e) in C:\projects\SUPANOVA WEBSITE\Source\web\maintenance\car.aspx.vb:789
System.Web.UI.WebControls.DataGrid.OnUpdateCommand(DataGridCommandEventArgs e)
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e)
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e)
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()

The permissions to the directory and the database file allow full control to iusr_Computername. I have tried reinstalling MDAC 2.8 and jet 4.0 SP7. I have also reinstalled XP SP1a and Office XP, which was suggested by some other news groups. The only thing that has changed on my PC recently has been that I installed SQL Server 2000 Evaluation Client software on it. I am using a DataAdapter.InsertCommand to do the updates and inserts. And I am using a dataadapter to get data back from the database. I am using .Net Framework 1.1 Version 1.1.4322 and Access XP(2002) SP1.

Thanking you in Advance
Kurt
 
Have you set the aspnet user to have permissions to the file?

aspnet user needs to be able to access it as well. That would be where I'd look first.

D'Arcy
 
Darcy,
I have the same type of problem, but don't know how to set up permissions for aspnet user. Can you aim me? Thanks.
 
all you need to do is right click on the directory or file, and select properties>security, and add the aspnet user to the list. Then give that user whatever permissions you want for that directory/file.

voila!

D'Arcy
 
D'Arcy,
I am embarrassed to ask, but when I right-click the .mdb file I get tabs labelled "General" and "Summary", but don't see anything related to security.
 
Are you using the NTFS file system? To check open windows explorer and right click on the hard drive which you are using, go to properties. Under the general tab you can see whether you are using NTFS or the FAT file system. Only NTFS can change security on files. Be careful if you try to change the file system as it could cause alot of damage if it doesn't go right.
My problem ended up being a subroutine that opened a datareader and did not close it. the commputer collected to many unused open datareaders and threw the unspcified error.
Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top