?
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
Medium Priority
?
454 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 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