• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Hello Everyone, I'm getting the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/EnvironmentalASP/environTable.asp, line 68

The error comes from this line (line 68):

Here is the code:

sql="SELECT * FROM Table1 ORDER BY postingDate DESC"
Set RS=Conn.Execute(sql)
Do while not RS.EOF
      if aspStartDate=CDate("8/8/1988") then aspStartDate="To Be Announced"
      if aspEndDate=CDate("8/8/1988") then aspEndDate="To Be Announced"

      if aspEndDate<>"To Be Announced" then intDaysDiffEnd=DateDiff("d",today,aspEndDate)
      if (intDaysDiffStart<=0 and intDaysDiffEnd>=0) or aspEndDate="To Be Announced" then

I don't know if this will help, but this is the data that I'm trying to insert into the database table called TABLE1

INSERT INTO Table1 (startDate, endDate, Location, Description, postingDate, requestedBy, ccedTo, Other, EIA, EIAComments, EIALink) VALUES ('6/23/2006','6/23/2006','TestLocation1','TestProject2','6/23/2006','','','','No','*','')
  • 3
1 Solution
This error is caused when you try to insert too much data into a specified field. For example if you enter a string that is 20 characters long into a field that is defined as varChar(10), or if you try to insert a value greater than 215 (approx 2.1 billion) into an Integer field.

Make sure that your datatype and data size defined in your database is consistant with the data you are trying to insert.

Gemini532Author Commented:
The strange part was that the datatype was text and I changed it to varchar(50) and it worked, but I thought that text was greater than varchar(50), I thought text allowed more characters...  Your answer fixed the problem, but can you explain why...?
I remember having an issue with using "Select *" instead of "Select col1,col2" in your sql queries that have a text or ntext columns. Try reverting your column datatype back to text and use the "Select col1,col2.." SQL syntax to retrieve them.

Here is an article that explains the issue a bit further...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now