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
444 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
An ASP query I cannot work out... 2 46
Response.Flush in Classic ASP causing TIME_WAIT ports 9 84
JSON error 4 50
CDO.Message not able to send attachement 5 10
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

919 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

17 Experts available now in Live!

Get 1:1 Help Now