access| Access
Problem: I hung an Access database on ASP and found that it does not support the group BY or ORDER BY clause, what is the reason?
SELECT * from ZYCKB Group by CKDWDM where Cksj>cdate (1998/12/31)
Microsoft OLE DB Provider for ODBC Drivers error 80040E21
The required properties are not supported by the ODBC driver.
The 1 group clause can only be used after the WHERE clause.
2 directly using the Microsoft.Jet.OLEDB.4.0 layer interface:
Adoconnection.open "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath ("/") & "Xxx.mdb"
Do not use the Microsoft OLE DB Provider for ODBC Drivers + Microsoft Access Driver (*.mdb) (Access ODBC Driver) Two-tier interface:
Adoconnection.open "Provider=msdasql.1;driver=microsoft Access Driver (*.mdb);D bq=" & Server.MapPath ("/") & Xxx.mdb "
Http://www.china-askpro.com/msg23/qa27.shtml
Troubleshooting 80004005 and other error messages
---------------------------------------------
The information in this article applies to:
Microsoft Data Access Components versions 1.5, 2.0, 2.1, 2.5
Active Server Pages
Microsoft Visual InterDev, version 1.0
-------------------------------------------
Profile
This article details some of the common reasons Microsoft Data Access Component (MDAC) received 0x800040005 errors, including the ActiveX data
Like, OLE DB, and Remote Data Services (RDS). Also, this article discusses some other error messages, including 80040E21, 80040e14, and
80040e10.
More information
The 80004005 error message can be summed up as: "For some reason, I can't access your data." This article gives a list of the various 80004005 error messages,
It lists the most common causes of these error messages and their troubleshooting steps. Although this article assumes that you are on the Active Server page (ASP) page
(. asp) use ActiveX Data Objects (ADO), but these causes and many troubleshooting steps apply to any other loop that accesses data through ODBC
Border.
Error message list
In this section we describe the text of various error messages and the cause of the error.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [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.
Reason
This error occurs, usually because the account (usually IUSR) used by Internet information Server (IIS) does not have the correct Windows
NT permission, you cannot access a file-based database or a folder that contains files.
Please check the permissions settings for these files and folders. Verify that you can create and/or delete any temporary files. Temporary files are generally created in the same database as the
folder, but can also be created under other folders, such as/winnt.
You can use the Windows NT file Monitor to check the cause of failed access to the file. The Windows NT file Monitor can be obtained from the following WEB sites:
Http://www.sysinternals.com.
If you are using the network path (UNC or image Drive) of the database, check the permissions on the share, files, and folders.
Verify that the file and data source name (DSN) are not marked as exclusive.
Simplified. Use a system DSN that uses a local drive letter. If necessary, move the database to a local drive and test it.
Other users in the error message (other user) may be Visual InterDev. Please close any Visual that contains the database data connection
InterDev Engineering.
The error may also be caused by a delegation problem. Check for any authentication methods that may exist ("basic" instead of NTLM). If the connection string uses the
is a universal naming convention (UNC), try using Basic authentication or an absolute path, such as C:\Mydata\Data.mdb. Even if the UNC points to a resource
is located on the local IIS computer, the preceding error may also occur.
When you access a Microsoft Access database that is linked to a table, if the table is in an Access database on a network server, this error also
Could happen. In this case, refer to the following Microsoft knowledge Base article to find a workable solution:
Q189408 prb:asp cannot access network files under IIS 4.0
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [microsoft][odbc Microsoft Access Driver]
Couldnt use (unknown); File already in use.
Reason
The database cannot be locked correctly for multiple users. For more information, see the following Microsoft knowledge Base article:
Q174943 prb:80004005 "couldnt use (unknown), File already in use"
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [Microsoft][odbc Driver Manager] Data source
Name not found and no default driver specified.
Reason
The most common reason is because the connection string session variables initialized in Global.asa and Global.asa are not fired. You can pass in the. asp page
Add the following code to check that the variable is correctly initialized:
Another common reason is that there are too many spaces in the connection string being used.
DSN = MyDSN; Database = Pubs;
Try using the following syntax instead:
Dsn=mydsn;database=pubs;
If the Global.asa file is not fired, check and verify that it is under the application root of IIS 4.0 (if you are running IIS 3.0, you should be in the virtual
Root and the Execute check box is selected. In addition, when Windows NT permissions restrict access to a folder, an error in the program design
may also prevent Global.asa files from being fired. For more information, see Microsoft Knowledge Base article: Q173742 BUG: Restricting
Global.asa is not executed when Web access
The DSN name could not be found. Check to make sure that you do not use the "user" type of DSN.
If you are using a File DSN or a System DSN, try to change the connection string to DSN=MYSYSTEMDSN or dbq=myfiledsn accordingly. Simplified!
Check and verify that the latest drivers are installed. If you are not sure, download the latest MDAC from the following Web site (Microsoft data Access Group
Pieces):
http://www.microsoft.com/data/
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [Microsoft][odbc Driver Manager] Data source
Name not??
Reason
This problem appears to be related to the order in which software is installed or unloaded on your computer. If the ODBC kernel files are not synchronized (they must be of the same version), it is possible
This is a mistake.
Please download the latest version of MDAC (Microsoft data access component) from the following Web site to upgrade all ODBC core drivers:
http://www.microsoft.com/data/
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [microsoft][odbc Access ODBC driver Driver]
General error Unable to open registry key DriverID.
Reason
This error is caused by reading the value from the registry. Use Registry Editor (Regedt32.exe) to check the permissions that are set on the registry key. You can also
To check registry read failures with Windows NT Registry Monitor (NTRegMon). NTRegMon can be downloaded from the following WEB sites:
Http://www.sysinternals.com
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [MICROSOFT][ODBC SQL Server DRIVER][DBNMPNTW]
ConnectionOpen (CreateFile ()).
Reason
There are two reasons for this error. They are all related to permissions, either the database and WEB server are not on a single computer, or the database is being referenced through a UNC path (\\Server\Share). Even if the database is on the same computer as the Web server, the UNC path makes the Web server think of the database as if it is on another computer on the network.
If an. asp page is being accessed by an anonymous user, the following occurs:
IIS will use (default) Windows NT account: usr_>.
Because the account is a local account of the WEB server, other computers on the network simply have no way of knowing the account. When IIS (security ring in the IUSR account)
When you try to access any resource on a remote computer, the remote computer verifies the account that it uses. Because the IUSR account is a local account, the
It is not known to the remote computer, so access is denied.
When anonymous access raises this issue, there are two solutions:
In the Internet Service Manager tool, change the Anonymous logon account from the default local account to a valid domain-based account from the Web property. In use
User Name field, enter the domain account you want to use, in DOMAIN\userid format. In this way, the remote computer can use a domain controller to verify that IIS passes to it
Security credentials.
Or
The account that is replicated on the remote computer that contains the resource you want to access iusr_>
。 If the account was created on a remote computer and contains identical names and passwords, Windows NT treats them as equivalent accounts.
Or
If the. asp page allows only authenticated access, refer to the following:
If the page does not allow anonymous access, IIS will attempt to authenticate the user who made the request and use its security credentials to control all its activities, such as accessing the database
's activities. The following two main reasons for failure in this scenario are described.
By default, IIS is configured to use Windows NT Challenge/response as its authentication method. Due to Windows NT 4.0 (and earlier versions
This) security model, users with Windows NT Challenge/response Authentication cannot access resources on the remote computer. This usually
Called delegation issues. To verify that this is not the case, in the Internet Service Manager tool, select the basic (clear text) check from the Web properties
box, and then clear the Windows NT challenge/response. If this step solves the problem, it is clearly a delegation issue.
Or
If the problem persists, it may be that the user account you are using does not have the correct SQL Windows NT computer permissions. may wish to try to use a clear possession of the
An account for SQL computer access rights.
For more information about delegation, how IIS protects your Web site by authentication, and related issues, see the article "IIS Authentication and
Security for Internet developers, which is located at the following Web site:
Http://www.microsoft.com/workshop/server/feature/security.asp
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 microsoft][odbc Microsoft SQL Driver] Logon
Failed ()
Reason
This error occurs when the SQL server does not accept or do not recognize the submitted login account and/or password (when using standard security), or if there is no Windows NT
When an account is mapped to a SQL account (when using integrated security), it is generated by the SQL Server.
If you are using standard security, the SQL account name and password are incorrect. Please try using the System Administrator account and password (uid= "SA", the password is
Empty). These must be defined in the connection string line because DSN does not store user names and passwords.
If you are using integrated security, check the Windows NT account that calls the page to find the target account that it maps to.
SQL does not allow underscores in SQL account names. If someone manually maps Windows NT account IUSR_machinename to a SQL account with the same name
Households, they will fail. Map all accounts that contain an underscore to an account name in SQL that does not contain an underscore.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [MICROSOFT][ODBC SQL Server Driver][sql
Server] Login Failed-user:reason:not defined as a valid User of a trusted SQL Server connection.
Reason
Integrated security is turned on in SQL Enterprise Manager (Enterprise Manager), and the Windows NT account that is being used is not mapped to a SQL account.
Try converting SQL to standard security (in Enterprise Manager, select Server/sql server/configure/security
Options/standard.
If you are running under IIS 4.0, deselect the password synchronization for the project.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [microsoft][odbc Microsoft Access Driver]
Couldnt lock file.
Reason
This error may be caused by the lack of proper permissions to create a lock file (. ldb) for a Microsoft Access database. By default, the lock text
Pieces are created in the same folder as the Microsoft Access. mdb file.
Try giving the user who accesses the database (usually IUSR_machinename) Full control of the share/folder.
Sometimes, shared folder permissions are set to read-only. You can also try to change the connection mode, where you can use the following sample code:
Set Conn = Server.CreateObject ("ADODB. Connection ")
Conn.mode = adModeShareDenyWrite 8
From Adovbs.inc
----ConnectModeEnum Values----
Const adModeUnknown = 0
Const adModeRead = 1
Const adModeWrite = 2
Const adModeReadWrite = 3
Const adModeShareDenyRead = 4
Const adModeShareDenyWrite = 8
Const admodeshareexclusive = &HC
Const adModeShareDenyNone = &h10
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [microsoft][odbc Microsoft Access 97
Driver] (unknown) isnt a valid path. Make sure this the path name is spelled correctly and so you are
Connected to the server on which the file resides.
Reason
The path read by the WEB server is an invalid path. When the Global.asa file is in use and the connection string is another computer outside the WEB server
This error is most likely to occur when you create it. If the path is an image drive letter, it may be valid only for the client computer that created the connection string.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [MICROSOFT][ODBC SQL Server Driver][sql
Server] The query and the views in it exceed the limit.
Reason
The query is too complex. There are too many restrictions in the query.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [MICROSOFT][ODBC SQL Server DRIVER][DBNMPNTW]
ConnectionWrite (GetOverlappedResult ()).
Reason
When the Allow anonymous users environment is turned off, Windows NT closes the pipeline that connects to SQL Server after the first request completes. This is because, first
A connection to SQL Server was established in the IIS anonymous user account. Then, IIS either chooses to impersonate a browser client on the same thread, or tastes
Try to access connections on other threads running in an impersonated user environment. In either case, Windows NT will detect if anyone is trying to use one of the
A network named pipe handle opened in another user's environment, and the pipe is closed according to security rules. In the view of SQL Server Network Monitor, this is
A request from Windows NT to close a named pipe, causing an error in the Web browser.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80004005 [MICROSOFT][ODBC SQL Server DRIVER][DBMSSOCN]
General network error. Check your network document
Reason
This error can occur if the SQL server is renamed. A DSN referencing the old name will fail because the computer name cannot be found.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80040e21 Errors occurred
Reason
This error may be caused by an attempt to insert too much data into a field that exceeds the allowable value. For example, a Microsoft Access field format setting
To accept only 25 characters and attempt to insert 26 characters.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80040e14 [microsoft][odbc Microsoft Access Driver]
Syntax error in INSERT into statement.
Reason
A column name may be a reserved word, such as DATE. Change the column name to a non reserved word, such as saledate.
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80040e10 [microsoft][odbc Microsoft Access Driver]
Too few parameters. Expected 1.
Reason
The column name used in the query syntax does not exist. Often, it's just a typo. Check the column names in the query string against the column names in the database. If
Using Microsoft Access, make sure that you are using the actual column name, not the column's display name.
Reference
To enable the Visual InterDev remote Workstation to work, follow the following Microsoft knowledge Base article to establish your system
Dsn:
Q178215 HOWTO: Configure VID for authentication Web engineering
Q174943 prb:80004005 "couldnt use (unknown), File already in use"
Q173742 BUG: When Web access is restricted, Global.asa is not executed
Q172864 ASP pages cannot access session and application objects
Q156526 common errors when connecting to an Access data source =51
Q175671 PRB: SQL80004005 ConnectionOpen (CreateFile ()) error while accessing
Q149425 IDC: Executing a query error, not defined as a valid user
Q167452 PRB: ' Not a valid path ' error when using Access data source
Q125767 PRB: Queries that execute SQL queries are too complex to error
Q166659 PRB: Failed to access SQL database on second attempt
Q166029 PRB: When you use Access, you cannot open an unknown file
Q178215 HOWTO: Configure VID for authentication Web engineering
When you take long text data from a recordset in an ASP page, you receive the following error behavior:
Microsoftoledbproviderforodbcdrivers Error 80040E21
Errorsoccurred
There are three ways to do this:
(i) open a recordset using the rs.opensql,conn,1,3 method
(ii) Put the column in the first column out, such as comment store a longer text content, take the recordset content, first come to a comment=rs ("comment") to take out the trick of the things to put in the memory variable, and then operate the other fields. Because the general long text content does not appear in the first display, it is generally taken out to be placed in a memory variable.
(iii) The database is connected to OLE DB mode. This error does not occur when you connect to the database in this way (at least I haven't encountered it). In my system, the error appears immediately after the current OLE DB connection is changed to ODBC connection mode.
This error is suspected to be caused by an ASP's mechanism for fetching data from the recordset returned by ODBC. A third approach is recommended to avoid this error.
Questions:
What do you mean by the following types of errors?
Microsoft OLE DB Provider for ODBC Drivers error 80040E21
The request properties can not is supported by this ODBC Driver
Database field length is not enough
Error message
Microsoft OLE DB Provider for ODBC Drivers error 80040E21
The request properties can not is supported by this ODBC Driver.
_scriptlibrary/recordset.asp, line 466
Reason
When the Recordset DTC has the cursor Location property set to "2-use Server Side Cursors" (the default value), it Canno T return multiple recordsets.
Multiple recordsets cannot be returned when the Recordset DTC cursor is set to 2 (server-side cursors, default values)
Resolution
Under The Properties dialog box for the Recordset DTC, go to the Advanced tab and change the cursor location from "2-use Server-side Cursor "to" 3-use client-side Cursor. "
ASP error Codes
Error code error messages and extended information
ASP0100 out of memory (memory overflow)
ASP0101 Unexpected error (function returns e x C e p t i o n _ n a m e)
ASP0102 expecting string input (expecting string entry)
ASP0103 expecting numeric input (expecting digital input)
ASP0104 operating not allowed (operation not allowed)
ASP0105 Index out of range (array subscript overflow)
ASP0106 type mismatch (data type mismatch)
ASP0107 Stack Overflow (the amount of data processed exceeds the allowable range)
ASP0115 Unexpected error (possible catch error in external object e x C e p t i o n _ n a m e, script cannot continue to run)
ASP0177 S e R v e r.createobject Failed (invalid P r o g I D)
ASP0190 Unexpected error (catch errors when releasing external objects)
ASP0191 Unexpected error (can be caught in an o n S t P a G e method of an external object)
ASP0192 Unexpected error (can be caught in the OnEndPage method of an external object)
ASP0193 OnStartPage Failed (Error in the o n S t P a G e method of the external object)
ASP0194 OnEndPage Failed (an error occurred in the OnEndPage method of the external object)
ASP0240 Script Engine Exception (script engine throws an exception e x c e p t i o n _ n a m e) from O B J e C t _ n a m e)
ASP0241 CreateObject Exception (object_name of the C R e a T e O b J E C T method causes the exception e x C e p T i O n _ n a m e)
ASP0242 Query OnStartPage Interface Exception (Query object o b J e C t _ n a m e's o n S t a r T p a g e or O n e n d p a g E
Method causes an exception e x c e p t i o n _ n a m e)
------------------
ADO Error Codes
In addition to the provider errors that are described in the Error object and the Errors collection, ADO itself returns errors to the exception handling mechanism of the run-time environment. Using error-trapping mechanisms in the programming language, such as Microsoft? Visual Basic? To catch and handle the following errors. The following table displays both decimal and hexadecimal error code values.
Constant Name Number description
Aderrinvalidargument 3001 0X800A0BB9
The parameter used by the application is of a wrong type, is out of an acceptable range, or conflicts with other parameters.
Aderrnocurrentrecord 3021 0X800A0BCD
BOF or EOF is True, or the current record has been deleted. The operation requested by the application requires the current record.
Aderrillegaloperation 3219 0x800a0c93
The operation requested by the application is not allowed to appear in this context
Aderrintransaction 3246 0x800a0cae
An application cannot explicitly close the Connection object in a transaction.
Aderrfeaturenotavailable 3251 0X800A0CB3
The operation requested by the application is not supported by the provider.
adErrItemNotFound 3265 0X800A0CC1
ADO cannot find an object in the collection that corresponds to the name or order reference of the application request.
Aderrobjectincollection 3367 0x800a0d27
Cannot append, the object is already in the collection.
Aderrobjectnotset 3420 0x800a0d5c
The object referenced by the application no longer points to a valid object.
Aderrdataconversion 3421 0x800a0d5d
The application used a value type that does not conform to the current operation.
aderrobjectclosed 3704 0x800a0e78
If the object is closed, the operation requested by the application is not allowed.
Aderrobjectopen 3705 0x800a0e79
If the object is open, the operation requested by the application is not allowed.
Aderrprovidernotfound 3706 0x800a0e7a
ADO could not find the specified provider.
Aderrboundtocommand 3707 0x800a0e7b
The application cannot use the Command object to change the Recordset object's ActiveConnection property to its source data.
Aderrinvalidparaminfo 3708 0x800a0e7c
The application incorrectly defines the Parameter object.
Aderrinvalidconnection 3709 0x800a0e7d
An application requests an action on an object by referencing a closed or invalid Connection object.
-------------------------
VBScript error message
----------------------------------------------------
Error code information
5 Invalid procedure call or parameter
6 Overflow
7 Not enough memory
9 Subscript out of bounds
10 array length fixed or temporarily locked
11 by 0 apart
13 Type Mismatch
14 String Space Overflow
28 Stack Space Overflow
The Sub or Function is undefined
48 Error loading DLL
51 Internal Error
53 File not Found
57 Device I/O error
58 File already exists
61 the disk is full
67 Too many files
70 No permissions
75 Path/File access error
76 Path not found
91 no object variable or with block variable set
92 Uninitialized for Loop
94 Invalid Null Usage
322 Unable to create the necessary temporary files
424 Requirements to use objects
429 ActiveX Part Cannot create object
430 classes do not support automation
File name or class name not found during 432 automation operation
438 object does not support this property or method
440 Automation Error
445 object does not support this operation
446 object does not support named arguments
447 object does not support current locale setting
448 No named parameters found
449 This parameter must be selected
450 parameter count error or invalid property assignment
451 objects are not collections
453 The specified DLL function was not found
455 Code resource Lock Error
457 This key has been associated with an element in the collection
Variables using automation types are not supported in 458 VBScript
500 variable Not defined
501 Illegal assignment
502 Scripting with this object can be an error
503 object cannot be safely initialized
1001 Not enough memory
1002 Syntax Errors
1003 Missing ":"
1004 lack of ";"
1005 Missing "("
1006 missing ")"
1007 Missing "]"
1008 missing "{"
1009 Missing "}"
1010 Missing identifiers
1011 Missing "="
1012 Missing "If"
1013 missing "to"
1014 Missing "End"
1015 Missing "Function"
1016 Missing "Sub"
1017 Missing "Then"
1018 missing "Wend"
1019 Missing "Loop"
1020 Missing "Next"
1021 Missing "case"
1022 Missing "Select"
1023 lack of expression
1024 Missing statements
1025 Statement not finished
1026 lack of integral constants
1027 missing "while" or "Until"
1028 missing "while", "Until", or end of statement
1029 Local variables or too many parameters
1030 identifier too long
1031 Invalid number
1032 Invalid characters
1033 The string constant is not terminated
1034 No comment terminated
1035 nested annotations
1037 "Me" keyword is not used
1038 "Loop" lacks "do"
1039 invalid "Exit" statement
1040 invalid "for" loop control variable
1041 names are redefined
1042 must be the first statement in the line
1043 cannot assign a value to a ByVal parameter
1044 cannot use parentheses when calling Sub
1045 Missing Letter Constants
1046 missing "in"
32766 True
32767 False
32811 element not found