>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
CustomerRS.MoveNext
Loop
HTH