Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old July 27th, 2010, 08:30 AM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Type: ADODB.Recordset (0x800A0CC1)

The data is actually getting to the database; but the page is not returbning proper page and info.
Reply With Quote
  #12 (permalink)  
Old July 27th, 2010, 09:23 AM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Type:Item cannot be found in the collection corresponding to the requested name

Technical Information (for support personnel)

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/asp/dtsAddRequest.asp, line 947


Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 1.1.4322; MS-RTC EA 2; MS-RTC LM 8)

Page:
POST 463 bytes to /asp/dtsAddRequest.asp

POST Data:
cf=1&TicketNubmer=&CreationDate=&userType=1&Machin e=&Manager=&ReceivedBy=&Source=&AssignedTo=&Priori ty=&Hardware=&Software=&Status=&InformedUser=&Time Solved=&StaffNT=&NTEstimatedTime=&DoneNT=&MoreInfo . . .

Time:
Tuesday, July 27, 2010, 9:24:52 AM
Reply With Quote
  #13 (permalink)  
Old July 27th, 2010, 02:08 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

First of all, fix your browser.

Click on the TOOLS menu.
Click on the INTERNET OPTIONS menu item.
Click on ADVANCED tab.
*UN*check "Show friendly HTTP error meesages"
OK

Now you will get the actual ASP errors, instead of the useless 500 crud that MSIE generates.

*************

The error you are seeing means that you are trying to get the value of a field from the recordset when that field does not exist in the record.

Example:
Code:
SQL = "SELECT name, address FROM people WHERE id = " & id
Set RS = conn.Execute( SQL )
Response.Write RS("phone")
The SELECT statement only selected the field name and address so you can't then ask for the "phone" field.

To fix the problem, you need to add "phone" to the list of fields in the SELECT:
Code:
SQL = "SELECT name, address, phone FROM people WHERE id = " & id
Of course it is also possible that you are simply misspelling the name of the field in your ASP code. Or or or...

Since I have no idea which is line 947, I'll let you find that line and diagnose the problem.
Reply With Quote
  #14 (permalink)  
Old July 27th, 2010, 02:10 PM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Type:Item cannot be found in the collection corresponding to the requested name

Thanks, b ut the thread has progressed beyond this already.
Reply With Quote
  #15 (permalink)  
Old July 27th, 2010, 02:13 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Amazingly enough, I *THINK* I found your error:
Code:
strTicketNumber = rsAddRequest("TicketNubmer")
Session("TICKETNUMBER") = strTicketNubmer

Two different places where you spelled "number" wrong.


Reply With Quote
  #16 (permalink)  
Old July 27th, 2010, 02:16 PM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Type:Item cannot be found in the collection corresponding to the requested name

Surprisingly they did that on purpose.
Reply With Quote
  #17 (permalink)  
Old July 27th, 2010, 02:48 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Quote:
Originally Posted by peony88 View Post
Thanks, b ut the thread has progressed beyond this already.
No idea what that is supposed to mean.
Reply With Quote
  #18 (permalink)  
Old July 27th, 2010, 02:51 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Quote:
Originally Posted by peony88 View Post
Surprisingly they did that on purpose.
I don't think I believe that. There is no such variable on the page as strTicketNubmer (there is an oft-used variable named just TicketNubmer, but that's not the same variable...no "str" on the front).

Granted, there could be a field name misspelled in the DB. So maybe the first of those two lines is on purpose. But the second one is clearly wrong.

In any case, I guess I don't care. When/if you figure out which line is 947 then we will know the culprit.

Last edited by Old Pedant; July 27th, 2010 at 02:53 PM..
Reply With Quote
  #19 (permalink)  
Old July 27th, 2010, 03:04 PM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I've tried the spelling both ways, and receive the same message fir the line below:
This is line 947:
[code]
strTicketNumber = rsAddRequest("TicketNubmer")
[\code]

The error reads:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/asp/dtsAddRequest.asp, line 947


Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 1.1.4322; MS-RTC EA 2; MS-RTC LM 8)

Page:
POST 439 bytes to /asp/dtsAddRequest.asp
Reply With Quote
  #20 (permalink)  
Old July 27th, 2010, 03:44 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, I guess you'll just have to find out what the result of executing the stored procedure query is.

No, I'll tell you what: Let's put in some DEBUG code.

Bur first, FIX YOUR BROWSER as I suggested!! Stop getting those meaningless MSIE junk fake error messages.

*TEMPORARILY* replace line 947 with this code:
Code:
Dim fnum, ffld 
For fnum = 0 To rsAddRequest.Fields.Count-1
    Set ffld = rsAddRequest.Fields(fnum)
    Response.Write ffld.Name & "::" & ffld.Value & "<br/>"
Next
Response.End
That will dump out all the field names (and their values) in that recordset. If the name you need isn't in there, then you'll have to go look at that stored procedure (it_AddRequest) to find out why not.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript compilation error '800a03f6' 121 Classic ASP Professional 11 September 20th, 2009 01:48 PM
Microsoft VBScript compilation error '800a03f6' 121 Classic ASP Basics 1 September 17th, 2009 04:57 PM
Microsoft VBScript compilation error '800a03ee' snanuwa Classic ASP Databases 3 September 7th, 2006 06:51 AM
Microsoft VBScript compilation error karlzoe Classic ASP Databases 2 December 29th, 2004 10:44 AM



All times are GMT -4. The time now is 07:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.