Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop Through Record Set
Message
From
09/11/2001 15:51:28
 
 
To
09/11/2001 14:00:30
Casey Easterwood
L.A. Mechanical Solutions Inc.
Los Alamitos, California, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00579818
Message ID:
00579939
Views:
24
>I am trying to loop through a recordset created from a VFP table
>And I keep getting this error
>
>Microsoft VBScript runtime (0x800A01B6)
>Object doesn't support this property or method: 'movenext'
>/TestFolder/connection.asp, line 46
>
>Here is where I create the recordset]
>
> CustomerRS = Server.CreateObject(ADODB.recordset)
> CustomerRS = objconn.execute(CustomerQuery)
>
>And this is how I am looping through it
> For i = 0 to (CLng(noRecords)-1)
> Response.Write fields go here
> CustomerRS.movenext
> Next
>
>any suggestions

Is this VBScript?

You need to do this:
Set CustomerRS = objConn.Execute(CustomerQuery)
Where objConn is an open connection and CustomerQuery is a string with a valid SQL statement. Also I would loop like so:
Do While Not CustomerRS.EOF And Not CustomerRS.BOF
  '.. code
  CustomerRS.MoveNext
Loop
HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform