Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 24th, 2004, 10:52 PM
Authorized User
 
Join Date: Jan 2004
Location: Oklahoma City, , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error problems....

On addtonews.htm, I have 1 text box that is filled out, and you submit it. It works most of the time, BUT when I write a certain amount of words, this error pops up:

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.

/stacygraff/addtonews.asp, line 14

Does anyone understand why this is happening and what I can do about it?

The Code in that line 14 is:

rsAddNews.AddNew
rsAddNews.Fields("NewsInfo") = Request.Form("NewsInfo")
rsAddNews.Update

  #2 (permalink)  
Old January 26th, 2004, 06:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maybe the number of chars in Request.Form("NewsInfo") is more than the db field can store?
  #3 (permalink)  
Old January 26th, 2004, 03:46 PM
Authorized User
 
Join Date: Jan 2004
Location: Oklahoma City, , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to set it up to where the user can type in the current news (2 or 3 lines) like in a text area? I've used the textarea in the form, but it probably has to do with setting up that field in the database...?

  #4 (permalink)  
Old January 28th, 2004, 02:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check here: www.adopenstatic.com/faq/80040e21.asp. Usually caused because you have a field defined of a certain size (eg text(255)), and the user supplies more than this. You need to check this first, and if they've supplied too much, you need to either truncate it -or- tell the user to edit the submission and supply less data.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some problems Sheraz Khan C++ Programming 3 April 11th, 2008 03:42 PM
Installation problems - server error (C# version) MS BOOK: ASP.NET Website Programming Problem-Design-Solution 5 July 1st, 2007 09:46 PM
validate.asp problems and logon.asp problems p2ptolu Classic ASP Databases 0 February 16th, 2005 02:34 PM
Two Problems goraya C# 2 May 21st, 2004 05:54 AM
Problems kilika Javascript 1 October 3rd, 2003 02:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.