Opomba:
The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article.
One of the most common problems is insufficient folder or file permissions. If your database is located on a Windows 2000 or Windows XP computer and you receive an error message when you try to view a dynamic page in a web browser or in Live view, the error might be due to a permissions problem.
The Windows account attempting to access the database doesn’t have sufficient permissions. The account might be either the anonymous Windows account (by default, IUSR_computername) or a specific user account, if the page has been secured for authenticated access.
You must change the permissions to give the IUSR_computername account the correct permissions so the web server can access the database file. In addition, the folder containing the database file must also have certain permissions set to write to that database.
If the page is meant to be accessed anonymously, give the IUSR_computername account full control to the folder and database file, as described in the procedure below.
Additionally, if the path to the database is being referenced using UNC (\\Server\Share), make sure the Share Permissions give the IUSR_computername account full access. This step applies even if the share is on the local web server.
If you copy the database from another location, it may not inherit the permissions from its destination folder and you may have to change the permissions for the database.
-
To assign the IUSR account full permissions, select Full Control from the Type Of Access menu and click OK.
For added security, permissions can be set so that Read permission is disabled for the web folder containing the database. Browsing the folder won’t be permitted, but web pages will still be able to access the database.
For more information about the IUSR account and web server permissions, see the following TechNotes on the Adobe Support Center:
Understanding anonymous authentication and the IUSR account at www.adobe.com/go/authentication
Setting IIS web server permissions at www.adobe.com/go/server_permissions
These Microsoft error messages can occur when you request a dynamic page from the server if you use Internet Information Server (IIS) with a Microsoft database system such as Access or SQL Server.
Opomba:
Adobe does not provide technical support for third-party software such as Microsoft Windows, and IIS. If this information does not fix your problem, please contact Microsoft technical support or visit the Microsoft support website at http://support.microsoft.com/.
For more information on 80004005 errors, see “INFO: Troubleshooting Guide for 80004005 Errors in Active Server Pages and Microsoft Data Access Components (Q306518),” on the Microsoft website at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306518.
This error occurs when you attempt to view a dynamic page in a web browser or in Live view. The error message may vary depending on your database and web server. Other variations of the error message include:
80004005—Driver's SQLSetConnectAttr failed
80004005—General error unable to open registry key 'DriverId'
Here are possible causes and solutions:
The page can’t find the DSN. Make sure a DSN has been created on both the web server and on the local machine.
The DSN might have been set up as a user DSN, not as a system DSN. Delete the user DSN and create a system DSN to replace it.
Opomba:
If you don’t delete the user DSN, the duplicate DSN names produce a new ODBC error.
If you use Microsoft Access, the database file (.mdb) might be locked. The lock might be due to a DSN with a different name accessing the database. In Windows Explorer, search for the lock file (.ldb) in the folder containing the database file (.mdb) and delete the .ldb file. If another DSN is pointing to the same database file, delete the DSN to prevent the error in the future. Reboot the computer after making any changes.
This error occurs when you use a Microsoft Access database and attempt to view a dynamic page in a web browser or in Live view. Another variation of this error message is “80004005—Microsoft Jet database engine cannot open the file (unknown).”
The probable cause is a permissions problem. Here are some specific causes and solutions:
The account being used by Internet Information Server (usually IUSR) might not have the correct Windows permissions for a file-based database or for the folder containing the file. Check the permissions on the IIS account (IUSR) in the user manager.
You might not have permission to create or destroy temporary files. Check the permissions on the file and the folder. Make sure that you have permission to create 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 /Winnt.
In Windows 2000, the time-out value may need to be changed for the Access database DSN. To change the time-out value, select Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC). Click the System tab, highlight the correct DSN, and click the Configure button. Click the Options button and change the Page Timeout value to 5000.
If you still have problems, see the following Microsoft Knowledge Base articles:
PRB: 80004005 “Couldn't Use ‘(unknown)’; File Already in Use” at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q174943.
PRB: Microsoft Access Database Connectivity Fails in Active Server Pages at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q253604.
PRB: Error “Cannot Open File Unknown” Using Access at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q166029.
This error occurs when you use Microsoft SQL Server and attempt to view a dynamic page in a web browser or in Live view.
This error is generated by SQL Server if it doesn’t accept or recognize the logon account or password being submitted (if you’re using standard security), or if a Windows account does not map to a SQL account (if you’re using integrated security).
Here are possible solutions:
If you use standard security, the account name and password might be incorrect. Try the system Admin account and password (UID= “sa” and no password), which must be defined in the connection string line. (DSNs do not store user names and passwords.)
If you use integrated security, check the Windows account calling the page and find its mapped SQL account (if any).
SQL Server does not allow an underscore in SQL account names. If someone manually maps the Windows IUSR_machinename account to a SQL account of the same name, it will fail. Map any account that uses an underscore to an account name on SQL that does not use an underscore.
This error occurs when an event is updating a recordset or inserting data in a recordset.
Here are possible causes and solutions:
The permissions set on the folder containing the database are too restrictive. IUSR privileges must be set to read/write.
The permissions on the database file itself does not have full read/write privileges in effect.
The database might be located outside the Inetpub/wwwroot directory. Though you can view and search the data, you might not be able to update it unless the database is located in the wwwroot directory.
The recordset is based on a non-updateable query. Joins are good examples of non-updateable queries within a database. Restructure your queries so they are updateable.
For more information on this error, see “PRB: ASP ‘Error The Query Is Not Updateable’ When You Update Table Record,” in the Microsoft Knowledge Base at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q174640.
This error occurs when the server tries to process a page containing an Insert Record or Update Record server behavior, and the server behavior attempts to set the value of a Date/Time column in a Microsoft Access database to an empty string ("").
Microsoft Access has strong data typing; it imposes a rigorous set of rules on given column values. The empty string value in the SQL query cannot be stored in an Access Date/Time column. Currently, the only known workaround is to avoid inserting or updating Date/Time columns in Access with empty strings ("") or with any other value that does not correspond to the range of values specified for the data type.
This error occurs when a column specified in your SQL query does not exist in the database table. Check the column names in your database table against the SQL query. The cause of this error is often a typographical error.
This error occurs when you preview a page containing an Insert Record server behavior in a web browser and try to use it to insert a record in a Microsoft Access database.
You might be trying to insert a record into a database field that has a question mark (?) in its field name. The question mark is a special character for some database engines, including Microsoft Access, and should not be used for database table names or field names.
Open your database system and delete the question mark (?) from the field names, and update the server behaviors on your page that refer to this field.
This error occurs when the server tries to process a page containing an Insert Record server behavior.
This error typically results from one or more of the following problems with the name of a field, object, or variable in the database:
Using a reserved word as a name. Most databases have a set of reserved words. For example, “date” is a reserved word and cannot be used for column names in a database.
Using special characters in the name. Examples of special characters include:
. / * : ! # & - ?
Using a space in the name.
The error can also occur when an input mask is defined for an object in the database, and the inserted data does not conform to the mask.
To fix the problem, avoid using reserved words such as “date”, “name”, “select”, “where,” and “level” when specifying column names in your database. Also, eliminate spaces and special characters.
See the following web pages for lists of reserved words for common database systems:
Microsoft Access at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q209187
MySQL at http://dev.mysql.com/doc/mysql/en/reserved-words.html
This error occurs when the server tries to process a page containing an Update Record or Insert Record server behavior. The database cannot handle the update or insert operation the server behavior is trying to perform.
Here are possible causes and solutions:
The server behavior is trying to update a database table’s auto-number field or to insert a record into an auto-number field. Because auto-number fields are populated automatically by the database system, any attempt to externally populate them with a value fails.
The data the server behavior is updating or inserting is the wrong type for the database field, such as inserting a date into a Boolean (yes/no) field, inserting a string into a numeric field, or inserting an improperly formatted string into Date/Time field.
This error occurs when you attempt to view a dynamic page in a web browser or in Live view.
The problem occurs when the page tries to display data from an empty recordset. To solve the problem, apply the Show Region server behavior to the dynamic content to be displayed on the page, as follows:
One common error message that you might encounter when testing a PHP database connection to MySQL 4.1 is “Client does not support authentication protocol requested. Consider upgrading MySQL client.”
You may have to revert to an earlier version of MySQL, or install PHP 5 and copy some dynamic link libraries (DLLs). For detailed instructions, see Setting up a PHP development environment.