Here is my problem, I have an Access2010 database split into FE&BE. BE is hosted on the server in a folder on drive E. Selected users have the FE on their PC to access the BE and do normal activities like inserting, updating and reporting. A web application
done using ASP.net access the backend database for public users through the LAN.
Everything works fine, but sometimes for unkown reasons I get the error shown below, however, the FE does not get effect by this error.
If I don't do anything for 5 to 10 minutes, the web appliction somehow works ok and the error disappears. To do a quick fix, I open IIS and disable then enable windows authentication option and then the problem is solved right away.
Thanks for your support and help.
Server Error in '/' Application.
<div align="center">
</div>
Unspecified error
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.
Selected users have the FE on their PC to access the BE and do normal activities like inserting, updating and reporting.
Most likely, tha FE is not build to only open the database connection, execute some queries and then close the connection as soon as possible. When a user opens the FE, the .laccdb lock file is created and will be there untill all FE's are closed normally.
This is the reason many peoople give Access a bad name, because this is the wrong way to use Access in a multi user environemnt.
When you want to use Access in a mutliuser environment, you must open the database connection a late as possible, perform the SQL and close it as soon as possible. Always make sure the connection is closed properly, by adding error_handling to your code.
In ASP.NET, you can use the Using syntax to make sure the connection is always closed and disposed, even without adding error handling
Do you mean that I should not use Access database for web applications and FE users at the same time?
Yes you can, But when you build an Access Application using all the build in wizards, and create an frond and backend databasem, you; re asking for trouble, even when you don't want to use the data in a web application. Acces can be used as a database in
multi user environments but you need to build it just like you build a web application. Open the database as late as possible, close it as soon as possble. Only use action query's to modify or delete data, only use disconnected recordsets....
A web application is multo used, I've build many multi user applications (Windows, web and a combination of both) with Access without any problems. You only need to know how to use the tools that are avalable. In Access, that means that you don't use the
build in wizards but you need to write ALL data access code in VBA
Open the database as late as possible, close it as soon as possble. Only use action query's to modify or delete data, only use disconnected recordsets....
Thanks hans_v,
What I understood is that I should not link the FE with BE using linked tables, instead I should use VBA to run query on BE using ADO/DAO libraries to get the data required and disconnect.
barmajiat
Member
2 Points
9 Posts
[solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 24, 2013 09:54 PM|LINK
I'm having the same problem, did anyone find a solution? Thanks.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 26, 2013 02:17 AM|LINK
Hi,
Your description is too generic……So what codes have you written?
At which statement the error is thrown out?
barmajiat
Member
2 Points
9 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 28, 2013 05:55 PM|LINK
Dear Dong,
Here is my problem, I have an Access2010 database split into FE&BE. BE is hosted on the server in a folder on drive E. Selected users have the FE on their PC to access the BE and do normal activities like inserting, updating and reporting. A web application done using ASP.net access the backend database for public users through the LAN.
Everything works fine, but sometimes for unkown reasons I get the error shown below, however, the FE does not get effect by this error.
If I don't do anything for 5 to 10 minutes, the web appliction somehow works ok and the error disappears. To do a quick fix, I open IIS and disable then enable windows authentication option and then the problem is solved right away.
Thanks for your support and help.
Server Error in '/' Application.
<div align="center">
</div>
Unspecified error
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.
OleDbException: Unspecified error
Exception Details: System.Data.OleDb.
Source Error:
Line 6: dim dbconn,sql,dbcomm,dbread
Line 7: dbconn=New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=e:\db\TIM1.0_be.accdb;Persist Security Info=False;")
Line 8: dbconn.Open()
Line 9:
Line 10:
Source File: C:\inetpub\wwwroot\2013\
Stack Trace:
[OleDbException (0x80004005): Unspecified error]
Microsoft.VisualBasic.CompilerServices.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags) +202
Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors,
ResolutionFailure& Failure) +150
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn) +178
ASP.eoeg2013_tmp_visitors_aspx.Page_Load() in C:\inetpub\wwwroot\2013\tmp\Visitors.aspx:8
System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) +8
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +8672611
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
<div align="center">
</div>
Version Information: Microsoft .NET Framework Version:2.0.50727.4214; ASP.NET Version:2.0.50727.4209
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 29, 2013 12:17 AM|LINK
Hi,
Have you deployed this on IIS?Do you wanna make Access db shared by many customers?
hans_v
All-Star
35986 Points
6550 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 29, 2013 01:08 PM|LINK
Most likely, tha FE is not build to only open the database connection, execute some queries and then close the connection as soon as possible. When a user opens the FE, the .laccdb lock file is created and will be there untill all FE's are closed normally. This is the reason many peoople give Access a bad name, because this is the wrong way to use Access in a multi user environemnt.
When you want to use Access in a mutliuser environment, you must open the database connection a late as possible, perform the SQL and close it as soon as possible. Always make sure the connection is closed properly, by adding error_handling to your code. In ASP.NET, you can use the Using syntax to make sure the connection is always closed and disposed, even without adding error handling
http://www.mikesdotnetting.com/Article/26/Parameter-Queries-in-ASP.NET-with-MS-Access
barmajiat
Member
2 Points
9 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Jan 31, 2013 10:26 PM|LINK
Dear hans_v
Do you mean that I should not use Access database for web applications and FE users at the same time?
Thanks,
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Feb 01, 2013 12:09 AM|LINK
for multiple users, you'd better use SQL instead.
hans_v
All-Star
35986 Points
6550 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Feb 01, 2013 10:56 AM|LINK
Yes you can, But when you build an Access Application using all the build in wizards, and create an frond and backend databasem, you; re asking for trouble, even when you don't want to use the data in a web application. Acces can be used as a database in multi user environments but you need to build it just like you build a web application. Open the database as late as possible, close it as soon as possble. Only use action query's to modify or delete data, only use disconnected recordsets....
hans_v
All-Star
35986 Points
6550 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Feb 01, 2013 11:02 AM|LINK
A web application is multo used, I've build many multi user applications (Windows, web and a combination of both) with Access without any problems. You only need to know how to use the tools that are avalable. In Access, that means that you don't use the build in wizards but you need to write ALL data access code in VBA
barmajiat
Member
2 Points
9 Posts
Re: [solved] System.Data.OleDb.OleDbException: Unspecified error
Feb 01, 2013 11:44 AM|LINK
Thanks hans_v,
What I understood is that I should not link the FE with BE using linked tables, instead I should use VBA to run query on BE using ADO/DAO libraries to get the data required and disconnect.