Access Unspecified Error

  • Thread starter Thread starter Srinivas
  • Start date Start date
S

Srinivas

hi

string accessCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=d:\xyz.mdb";
using ( OleDbConnection oleCon = new OleDbConnection( accessCon ) )
{
try
{
oleCon.Open();
}
catch( System.Exception excep )
{
// log the exception message
}
}

I have impersonate set to "true" and have given read/write/modify
permissions on the "temp" folder under profile->local settings of
ASPNET account.

The above code works fine for users with administrative privileges but
fails when others execute it and throws an "Unspecified Error" trying
to open the connection.

What am I missing?

Thanks a lot in advance for any help.

- Srinivas
 
Can you open the DB from Access? Access has to create the .ldb file in the
same directory as the .mdb. Also make sure the file is not flagged "Read
Only" which I have seen happened when a file is copied to a CD drive.
 
hi Miha & Ray

yes. I have given them privileges on d:\xyz.mdb..
(d:\DataFiles\xyz.mdb, actually). I'm able to open this file from
MS-Access and also it is not flagged "Read Only". When I open the file
in MS-Access I can see the ldb created in the same folder.

This file is uploaded by users into d:\DataFiles folder on the web
server and my application is supposed to read this file and make
updates to the database. The file gets uploaded properly and gets
saved into this folder - so rights given to individual users seem to
be okay. After saving the file, the application fails when it tries to
open connection for reading data.

thanks
- Srinivas.
 
On 30 Nov 2003 10:57:10 -0800, (e-mail address removed) (Srinivas) wrote:

¤ hi
¤
¤ string accessCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=d:\xyz.mdb";
¤ using ( OleDbConnection oleCon = new OleDbConnection( accessCon ) )
¤ {
¤ try
¤ {
¤ oleCon.Open();
¤ }
¤ catch( System.Exception excep )
¤ {
¤ // log the exception message
¤ }
¤ }
¤
¤ I have impersonate set to "true" and have given read/write/modify
¤ permissions on the "temp" folder under profile->local settings of
¤ ASPNET account.
¤
¤ The above code works fine for users with administrative privileges but
¤ fails when others execute it and throws an "Unspecified Error" trying
¤ to open the connection.
¤
¤ What am I missing?
¤

You may want to check into the following as well:

PRB: "Disk or Network Error" or "Unspecified Error" Returned when Using Jet
http://support.microsoft.com/defaul...port/kb/articles/Q251/2/54.asp&NoWebContent=1


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
I modified the subject while posting my reply and it showed up on a
separate thread. Just posting it here again for the sake of
completeness.

===================================================================
Thanks Paul for the url.

http://support.microsoft.com/default.aspx?scid=kb;en-us;827190&Product=aspnet

this article mentions rights to be provided to profile temp folder for
..net v1.1 but it didn't help. when we gave access rights on the folder
pointed to by TEMP environment variable, it solved our issue.

Strange because this folder is supposed to be used only for .net v1.0
and not for v1.1. something fishy here..

thanks all for your help

- Srinivas.
 
Back
Top