Problem reading data from Access 2000

E

Ed

I cereated a database with only one table (person) in Access 2000 and
created and ODBC system DNS (PersonDB). I have following code in my ASP.Net

string ConStr = "DSN=PersonDB";
string ComStr = "Select Name from Person";
OdbcDataAdapter dataAdapter = new OdbcDataAdapter(ComStr, ConStr);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet, "Person");

I am using the same machine as server and client. I ran this after
restarting the machine so I know DB is not used. I get the followin
error on the last line above.


ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft
Jet database engine cannot open the file '(unknown)'. It is already
opened exclusively by another user, or you need permission to view its
data. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. 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. I have given read
access to ths mdb to IUSR_ account.

Thanks

Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened
exclusively by another user, or you need permission to view its data.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.
 
E

Ed

Ed said:
I cereated a database with only one table (person) in Access 2000 and
created and ODBC system DNS (PersonDB). I have following code in my ASP.Net

string ConStr = "DSN=PersonDB";
string ComStr = "Select Name from Person";
OdbcDataAdapter dataAdapter = new OdbcDataAdapter(ComStr, ConStr);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet, "Person");

I am using the same machine as server and client. I ran this after
restarting the machine so I know DB is not used. I get the followin
error on the last line above.


ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft
Jet database engine cannot open the file '(unknown)'. It is already
opened exclusively by another user, or you need permission to view its
data. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. 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. I have given read
access to ths mdb to IUSR_ account.

Thanks

Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened
exclusively by another user, or you need permission to view its data.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.

Never mind. I am used to ASP. I had to give ASPNET (and not IUSR_)
account access to the file.
 
E

Ed

Ed said:
I cereated a database with only one table (person) in Access 2000 and
created and ODBC system DNS (PersonDB). I have following code in my ASP.Net

string ConStr = "DSN=PersonDB";
string ComStr = "Select Name from Person";
OdbcDataAdapter dataAdapter = new OdbcDataAdapter(ComStr, ConStr);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet, "Person");

I am using the same machine as server and client. I ran this after
restarting the machine so I know DB is not used. I get the followin
error on the last line above.


ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft
Jet database engine cannot open the file '(unknown)'. It is already
opened exclusively by another user, or you need permission to view its
data. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. 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. I have given read
access to ths mdb to IUSR_ account.

Thanks
Never mind. I am used to ASP. I had to give ASPNET (and not IUSR_)
account access to the file.
Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened
exclusively by another user, or you need permission to view its data.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot open the file
'(unknown)'. It is already opened exclusively by another user, or you
need permission to view its data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top