Solved

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

Posted on 2006-06-23
4
443 Views
Last Modified: 2012-05-05
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):
      aspEIAComments=RS("EIAComments")


Here is the code:

sql="SELECT * FROM Table1 ORDER BY postingDate DESC"
Set RS=Conn.Execute(sql)
Do while not RS.EOF
      aspStartDate=RS("startDate")
      if aspStartDate=CDate("8/8/1988") then aspStartDate="To Be Announced"
      aspEndDate=RS("endDate")
      if aspEndDate=CDate("8/8/1988") then aspEndDate="To Be Announced"
      aspLocation=RS("Location")
      aspDescription=RS("Description")
      aspEIA=RS("EIA")
      aspEIALink=RS("EIALink")
      aspEIAComments=RS("EIAComments")
'response.write(aspEIAComments)
'response.end

      aspPostingDate=RS("postingDate")
            
      intDaysDiffStart=DateDiff("d",today,aspPostingDate)
      if aspEndDate<>"To Be Announced" then intDaysDiffEnd=DateDiff("d",today,aspEndDate)
      
      if (intDaysDiffStart<=0 and intDaysDiffEnd>=0) or aspEndDate="To Be Announced" then
            blnData=true
            %>


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','*','')
0
Comment
Question by:Gemini532
  • 3
4 Comments
 
LVL 21

Accepted Solution

by:
ap_sajith earned 500 total points
ID: 16974502
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.

Cheers!
0
 

Author Comment

by:Gemini532
ID: 16984508
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...?
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 16989631
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.

Cheers!
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 16989634
Here is an article that explains the issue a bit further...
http://www.aspfaq.com/show.asp?id=2096

Cheers!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now