วันเสาร์ที่ 12 กรกฎาคม พ.ศ. 2557

กรณี error [Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.

ตารางแสดงเวลาการเข้าและออกงาน    บจ.แกรนด์ กำจัดแมลง 
วันที่ : 12/7/2557 อัพเดททุก 15นาทีConnection Failed: PHP Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use., SQL state S1000 in SQLConnect in C:\Inetpub\wwwroot\v1\exemptime.php on line 51


ให้แก้ไขได้ ตามด้านล่าง
สำหรับเคสที่แกรนด์
-.สาเหตุที่เกินเพราะ ในระหว่างที่เรียกได้เปิดโปรแกรม grandattendance.exe ขึ้นมา ระหว่างเข้าใช้เวปเขียว ก้เกิดerror ด้านบน
-วิิธีแก้ไข
  • The account that Microsoft Internet Information Server (IIS) is using (which is usually IUSR) does not have the correct Windows NT permissions for a file-based database or for the folder that contains the file.
  • Check the permissions on the file and the folder. Make sure that you have the ability to create and/or destroy any temporary files. Temporary files are usually created in the same folder as the database, but the file may also be created in other folders such as the WINNT folder. For additional information about how to identify which folder does not have the correct permissions and how to configure temporary files, click the following article number to view the article in the Microsoft Knowledge Base:
    253604 Microsoft Access 97 database connectivity fails in Active Server Pages
กำหนด สิทธิ์ให้กับ ดังรูปล่าง ทั้ง4ตัว iusr และ iis เป็น full control เนื่องจาก temp file ที่ถูกสร้างไว้โดยการใช้ mdb ของ grandattendance.exe จึงเป็นสาเหุต error และสิทธิทีก่ำหนดให้สามารถ สร้างและ ลบ temp fileของ GrandAttendance.mdb ได้  GrandAttendance.ldb  คือ tempfileที่เกิดขึ้น 



When you use ActiveX Data Objects (ADO) or ODBC to connect to a Microsoft Access database, you may receive the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 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.

Collapse imageCAUSE

There are several causes for this error message:
  • The account that Microsoft Internet Information Server (IIS) is using (which is usually IUSR) does not have the correct Windows NT permissions for a file-based database or for the folder that contains the file.
  • The file and the data source name are marked as Exclusive.
  • Another process or user has the Access database open.
  • The error may be caused by a delegation issue. Check the authentication method (Basic versus NTLM), if any. If the connection string uses the Universal Naming Convention (UNC), try to use Basic authentication or an absolute path such as C:\Mydata\Data.mdb. This problem can occur even if the UNC points to a resource that is local to the IIS computer.
  • This error may also occur when you access a local Microsoft Access database that is linked to a table where the table is in an Access database on a network server.

Collapse imageRESOLUTION

The following items correspond to the previous list of causes:
  • Check the permissions on the file and the folder. Make sure that you have the ability to create and/or destroy any temporary files. Temporary files are usually created in the same folder as the database, but the file may also be created in other folders such as the WINNT folder. For additional information about how to identify which folder does not have the correct permissions and how to configure temporary files, click the following article number to view the article in the Microsoft Knowledge Base:
    253604 Microsoft Access 97 database connectivity fails in Active Server Pages
    If you use a network path to the database (UNC or mapped drive), check the permissions on the share, the file, and the folder.
  • Verify that the file and the data source name (DSN) are not marked as Exclusive.
  • The "other user" may be Microsoft Visual InterDev. Close any Visual InterDev projects that contain a data connection to the database.
  • Simplify. Use a System DSN that uses a local drive letter. If necessary, move the database to the local drive to test.
  • Follow the instructions in the following article to work around this problem:
    189408 FIX: ASP fails to access network files under IIS 4.0 and IIS 5.0

Collapse imageREFERENCES

To check for file access failures, use the Windows NT File Monitor. To download the File Monitor, see the following Sysinternals Web site:
Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น