Wrox Programmer Forums
|
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 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
 
Old March 14th, 2006, 02:33 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default Object required: 'rs' error

Hello all
Is there any one can help me to fix my prbolem with this error please?
the code is as below and when i run the program it gives me this error:
a= array("rs",..."rsn")
Dim i
for i=0 to n
a(i).movefirst()
while not a(i).eof
do something
wend
next
 would you please help me??????
thank you

 
Old March 14th, 2006, 02:45 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use the For Each loop,

a = array("rs",..."rsn")
For Each arrayElement In a
    'do something
Next

Here's a Tutorial on VBScript Looping Statements: http://www.w3schools.com/vbscript/vbscript_looping.asp

- A.Kahtava
 
Old March 14th, 2006, 03:29 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

I did as you told.but it still gives me same error.rs is the name of a recordsets.can it be cause i used recordsets in an array????

 
Old March 14th, 2006, 07:34 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes; it's probably because your recordset is in an array..
Could you post your source code with the error message?

- A.Kahtava





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Required error voyeur Javascript 9 January 25th, 2008 11:50 AM
object reqiured:rs error hastikeyvan Classic ASP Databases 1 March 14th, 2006 02:56 AM
object reqiured:rs error hastikeyvan Classic ASP Professional 1 March 14th, 2006 02:47 AM
Object required error ?? hman SQL Server ASP 11 June 21st, 2004 10:59 AM
error....Object required: '' sassenach Classic ASP Databases 2 August 4th, 2003 03:27 PM





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