DeveloperBarn Forums

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

Discuss "Classic ASP FAQ" in the ASP Development forum.

ASP Development - Learn coding practices and tips to get the best out of your Active Server Pages (ASP). The Classic ASP forum is for ASP/VBScript and ASP/JScript applications.


Closed Thread « Previous Thread | Next Thread »  
 
LinkBack (1) Thread Tools Display Modes
  #1 (permalink)  
Old March 17th, 2008, 08:27 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Classic ASP FAQ

This is an index of the most common classic ASP-related errors that users experience. Please search through this thread for a possible solution before posting your question.

This is not yet complete. There is a lot of information available and I will post as time allows.

Why do I get 8002000A errors?
Why do I get 80040200 / 80040514 / 800A0E7A errors?
Why do I get 80040e09 errors?
Why do I get 80040E0C errors?
Why do I get 80040E10 errors?
Why do I get 80040E14 errors? (Part 1)
Why do I get 80040E14 errors? (Part 2)
Why do I get 80040E21 errors?

Reference: 8000XXXX Errors
__________________
jmurrayhead
Did I help you out? Make me popular by clicking the icon!

If you found a post helpful, please click the button in the lower right-hand corner of the post.

Powered by ASP.Net
Sponsored Links
  #2 (permalink)  
Old March 17th, 2008, 08:30 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 8002000A errors?

Quote:
Provider error '8002000a'
Out of present range
This is typically because a numeric value that is too large for the data type has been passed when using an ADODB.Command. For example, sending 2^32 to a parameter that is specified as adInteger, will cause this error.
  #3 (permalink)  
Old March 17th, 2008, 08:48 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040200 / 80040514 / 800A0E7A errors?

This series of errors includes the following errors messages:

Quote:
ADO could not find the specified provider.

Provider cannot be found. It may not be properly installed.

Data source name not found and no default driver specified.

Unspecified runtime error.

Library not registered.

Class not registered.
If you receive one of these errors you should first check your connection string as there is most likely a typographical error.

You should also ensure you have the most recent version of MDAC installed, which can be downloaded here: MDAC Download

With Microsoft Access, this can be caused when trying to connect to the database using OLEDB, (e.g. Provider=Microsoft.Jet.OLEDB.4.0, without having the JET components installed. Microsoft stopped shipping the JET files with MDAC, starting at 2.6.

Connection pooling may cause the following error:
Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040200'
[Microsoft][ODBC Driver Manager] Only SQL_DRIVER_NOPROMPT is allowed when connection pooling is enabled
The prevent this error, you can override the prompt property of the connection object:
Code:
<% 
    const adPromptNever = 4 
    set conn = CreateObject("ADODB.Connection") 
    conn.Properties("Prompt") = adPromptNever 
    conn.open yourConnectionString
    ... 
%>
  #4 (permalink)  
Old March 17th, 2008, 08:57 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040e09 errors?

When using Microsoft Access databases, it is common to see the following message:
Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
or
Quote:
Microsoft JET Database Engine error '80040e09'
The following related messages may also be seen:
Quote:
Record(s) cannot be read; no read permission on '<table name>'.
or
Quote:
Cannot update. Database or object is read-only.
Ensure that the Internet User Account (IUSR_machinename) has Read/Write permissions on the database.

With SQL Server, you may receive the following message:
Quote:
[Microsoft][ODBC SQL Server Driver][SQL Server]
EXECUTE permission denied on object '<proc name>', database '<database name>', owner '<owner name>'.
This may also be related to permissions, so you should ensure that the user you're connecting to the database as has appropriate permissions on the appropriate database objects.

Some databases may give this error if table or column names have quotes around them. Quotes should be used for string literals only, not for object names.
  #5 (permalink)  
Old March 20th, 2008, 08:20 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040E0C errors?

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'
Command text was not set for the command object.
This error is typically caused by an empty SQL string. For example:

Code:
<%
    set conn = Server.CreateObject("ADODB.Connection")
    
    strSQL = "UPDATE users SET IsActive = 1 WHERE userID = 12:
    conn.Execute(SQLstr)
 
    ...
%>
Notice above, how strSQL was flipped to SQLstr, thus causing an empty SQL string to be passed to the connection object. Errors like this can be avoided by using Option Explicit. You will get another type of error, stating that the variable is "undefined". This should lead you to the solution.
  #6 (permalink)  
Old March 20th, 2008, 08:29 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040E10 errors?

The following errors are typically seen when creating SQL statements:

Quote:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
or

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected <n>.
or

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e10'
Procedure '<procedure>' expects parameter '<param>', which was not supplied.
This can be caused by one of the following things:
  1. One or more of the values was blank
  2. A field name was spelled incorrectly
  3. You tried to pass the wrong datatype (i.e. a string was passed as an integer by not placing quotes around it or a numeric value was passed as a string by placing quotes around it)
To troubleshoot this error, you can use response.write to write your SQL statement to the screen:

Code:
<%
    strSQL = "INSERT INTO usersToGroups VALUES("1", 3)"
    Response.Write(strSQL)
    Response.End
%>
Response.Write is vital when troubleshooting SQL statements, as well as other code.
  1 links from elsewhere to this Post. Click to view. #7 (permalink)  
Old March 20th, 2008, 09:32 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040E14 errors?

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Cannot insert the value NULL into column '<column>', table '<table>';
column does not allow nulls. INSERT fails. (or UPDATE fails.)
This error is self-explanatory. If you try to INSERT/UPDATE a column with a NULL value, and that column does not allow NULL values, you will get this error.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Cannot resolve collation conflict for EQUAL TO operation.
or
Quote:
Cannot resolve collation conflict for UNION operation.
You will get this error if you are using #temp tables and the collation on the tempdb does not match that of the databases you are working in. The collation of all affected databases should match or at least be compatible.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Argument data type text is invalid for argument <n> of <function> function
There are several string functions that cannot be performed against columns that have TEXT or NTEXT datatypes.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid object name '<objectname>'.
If the object in question does exist and you are in the correct database, then this is probably an issue with permissions.

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Syntax error (missing operator) in query expression '<expression>'
or
Quote:
Syntax error in INSERT INTO statement
or
Quote:
Syntax error in UPDATE statement
or
Quote:
Syntax error in FROM clause
or
Quote:
Syntax error in WHERE clause
or
Quote:
Line <n>: Incorrect syntax near '<character>'.
The possible reasons these errors could happen are:
  1. You used a reserved word as a column name or alias name (or used a column name that begins with a number or non-alphanumeric character)
  2. You didn't delimit a value properly
  3. There really is a syntax error in your SQL statement
Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Syntax error or access violation
This could be for the same reasons as above, or it could be that you are using an ADODB.Command object and are attempting to pass a string to an INT parameter or vice-versa.

Quote:
Microsoft OLE DB Provider for ODBC Drivers (0x80040e14)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
You will have to verify your query and table structure to determine why you may be violating one of these relationships.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.
You used sp_rename, but tried to execute it against a column or other object that doesn't exist (or the syntax is wrong).

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Undefined function 'NZ' in expression.
Several functions available within Access are not available via ADO/JET providers.

Quote:
Microsoft JET Database Engine error '80040e14'
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
This can happen if you try and use syntax like SELECT TOP 10 ... WITH TIES, or other syntax from SQL Server that is not directly portable to Access.

Quote:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
This could be from using a reserved word as a column or expression name, or it could be a real bonafide syntax error. Or, it could be that you are trying to send a batch of statements to Access. While the following will work with SQL Server, Jet prohibits it:

Code:
conn.execute "INSERT INTO tbl1 VALUES(1); INSERT INTO tbl1 VALUES(2)"
In order to prevent this error, you will need to send the two statements separately.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
SQL Web Assistant: Could not open the output file.
This is usually caused when you are using a web task to modify existing HTML files which are also in use by IIS. One workaround would be to cycle between two filenames... active and inactive. Flip which one is 'current' every time the web task runs, depending on the frequency of the web task, this will reduce the chance that someone will still have the inactive file open when you make the other file active. In addition, you could delete the inactive file after each run of the web task, to make it even more unlikely that IIS will have a lock on the file.

This can also happen if the account that the SQL Server and SQL Server Agent services don't have sufficient privileges on the folder where the web task outputs its file.

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Cannot create a row of size <n> which is greater than the allowable maximum of 8060.
This can happen if you have a table that is defined to allow more than 8060 characters per row (SQL Server warns you about this when creating the table, but allows you to create it nonetheless). This kind of structure can be useful if, say, you have two different VARCHAR(8000) columns where only one of them could possibly contain that much text. If you try to insert 8000 characters into both columns, you get the above error. Your SQL statements need to be constructed with logic that carefully insulates them from exceeding the physical bounds of the table. If you feel you might need to exceed 8060 characters in a single row, consider storing the characters off-row (e.g. in a TEXT/NTEXT column).

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Could not allocate space for object '<object>' in database '<database>' because the 'PRIMARY' filegroup is full.
This error happens for one of two reasons. Either the disk where the data is stored is full, or the database is not set to auto-grow and it has reached capacity. If the former, you will need to free up space on the drive (or move the data files to a different location). If the latter, you will need to set the database to auto-grow, or clear out stale data and perform a shrink.

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Could not insert a row larger than the page size into a hash table. Resubmit the query with the ROBUST PLAN hint.
or
Cannot create a worktable row larger than allowable maximum. Resubmit your query with the ROBUST PLAN hint.
or
The current query would generate a key size of <n> for a work table. This exceeds the maximum allowable limit of 900.
This usually means you are trying to run a complex query with a row width that the optimizer can't handle (typically due ot use of wide CHAR or VARCHAR columns). In SQL Server 7.0 and up, you can solve this issue by adding OPTION ROBUST PLAN to your query.

Of course, this could lead to the following error:

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Warning: The query processor could not produce a query plan from the optimizer because the total length of all the columns in the GROUP BY or ORDER BY clause exceeds 8000 bytes. Resubmit your query without the ROBUST PLAN hint.
Quote:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Invalid column name 'value'with_apostrophe'.
This is usually caused by using " instead of ' to delimit string values, often in an attempt to avoid having to replace ' with ''. However, " are not string delimiters by default in SQL Server, they are identifiers. This means that strings inside of " within a SQL expression are expected to contain column names. So, instead of:

Code:
SQL = "UPDATE table SET column = """ & request.form("value") & """"
use:
Code:
SQL = "UPDATE table SET column = '" & _ 
    replace(request.form("value"),"'","''") & "'"
Furthermore, two other comments: First, the act of doubling up the ' character is not only to prevent parsing errors, but also to avoid exposure to your system to attempts at SQL injection. Second, if you override the quoted identifiers so that " can be interpreted as a string delimiter, instead of worrying about ', now you have to worry about " in the value...

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid column name 'valid_column_name'.
This is probably because you used double-quotes around a value, e.g.
Code:
SELECT columns FROM table WHERE column="foo"
Use single-quotes:
Code:
SELECT columns FROM table WHERE column='foo'
  #8 (permalink)  
Old March 20th, 2008, 09:33 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040E14 errors? (...Continued)

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Cannot use empty object or column names. Use a single space if necessary.
This usually comes from code that looks like this:
Code:
SELECT * FROM table WHERE column=""
To immediately alleviate the problem, change " to ':
Code:
SELECT * FROM table WHERE column=''
Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Could not find stored procedure '<owner>.<procname>'.
Typically, this means that the stored procedure does not exist in the current database, or it is owned by a different owner than you are specifying in your EXEC call. (If you are not specifying an owner, than it is not owned by the user you are impersonating.)

Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Formal parameter '@param_name' was defined as OUTPUT but the actual parameter not declared OUTPUT.
This can happen if you are trying to retrieve an output parameter but the stored procedure definition doesn't explicitly declare the parameter as such. For example:

Code:
CREATE PROCEDURE dbo.myProc 
    @param_name INT 
AS 
...
Should be:
Code:
CREATE PROCEDURE dbo.myProc 
    @param_name INT OUTPUT 
AS 
...
Quote:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Divide by zero error encountered.
This error is also self-explanatory. Your query includes a division operation, and the denominator is zero (whether it's directly from table data, or calculated within the query, or derived from somewhere else (e.g. a COUNT or SUM from a subquery)). You will need to deal with this in some way; one of the more common ways is using case.

Code:
DECLARE @i INT 
SET @i = 0 
-- ... 
SELECT 5 / @i -- raises error 
GO 
 
DECLARE @i INT 
SET @i = 0 
-- ... 
SELECT 5 / CASE @i WHEN 0 THEN 1 ELSE @i END
  #9 (permalink)  
Old April 8th, 2008, 10:29 AM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 530
Thanks: 14
Thanked 38 Times in 37 Posts
Blog Entries: 2
Rep Power: 1
jmurrayhead is on a distinguished road

Awards Showcase
Microsoft .Net Microsoft SQL Server Microsoft Windows Classic ASP 
Total Awards: 4

Default Why do I get 80040E21 errors?

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.
This can happen if you use an adOpenStatic ADODB.Recordset object to open Excel, or use an adOpenKeyset recordset to perform paging.

Make sure the methods/properties you are using are supported by the driver/provider you are using to access your data.

If executing a stored procedure, ensure you do so through the connection.execute() method, rather than a command object, and add the following two lines of code to the beginning of your procedure:

Code:
SET ANSI_NULLS OFF 
SET NOCOUNT ON
Quote:
Microsoft OLE DB Provider for SQL Server error '80040e21'
Optional feature not implemented.
or

Quote:
ADOBD Parameter error '800a0d5d'
The application is using a value of the wrong type for
the current operation.
This can often be caused by using invalid ad* constants with ADODB.Command, such as adDBDate. Use adDBTimeStamp instead (see KB #214459) or use a straight EXEC statement instead of using the command object at all.

Quote:
Microsoft JET Database Engine error '80040e21'
Cannot include Memo, OLE, or Hyperlink Object when you select unique values (<column(s)>).
Access does not allow these 'special' columns to be included in DISTINCT queries. So if you have the following code, where bar is a memo column:
Code:
SELECT DISTINCT foo, bar FROM table
You could change it to the following to alleviate the error:
Code:
SELECT foo, bar FROM table GROUP BY foo, bar
Quote:
Microsoft OLE DB Provider for SQL Server error '80040e21'
Invalid character value for cast specification.
This can happen if you try and pass a NULL string or a non-string datatype to an ADODB.Recordset object or a stored procedure, and the database logic attempts to perform an implict or explicit CONVERT or CAST.

Quote:
Microsoft JET Database Engine error '80040e21'
You tried to execute a query that does not include the specified expression
'<column>' as part of an aggregate function.
If you are using an aggregate function (e.g. SUM, COUNT, MAX), then any other column in the SELECT list must also be in the GROUP BY clause. This is so that the database knows how to organize results.
Closed Thread

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Tags
8002000a, 80040200, 80040514, 80040e10, 80040e14, 80040e21, 800a0e7a, asp, error, faq

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.developerbarn.com/asp-development/23-classic-active-server-pages-faq.html
Posted By For Type Date
80040e14 Error - ASP Free Post #0 Refback July 2nd, 2008 11:51 AM


Sponsored Links

ASP.NET Resource Index
a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer.

Free Web Directory
Including Chats and Forums Resources, Offer automatic, instant and free directory submissions.
URLZ Web Directory
URLZ Web Directory

Free Web Directory - Add Your Link
The Little Web Directory
Free Web Directory
Pegasus free web directory is a free directory organised by categories.

Web Directory & SEO Services
dirroot web directory


All times are GMT -4. The time now is 07:48 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 DeveloperBarn.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46