Thread: Reading a table
View Single Post
  #4 (permalink)  
Old December 30th, 2004, 02:29 PM
harryinpa harryinpa is offline
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your help. I was able to get past the read of the SQL Server table by using a stored procedure but now when I use the method MoveNext, the program is telling me that it is expecting a function or variable. Here is the code I'm using:

GetActiveReps.Open
blnRepMatch = True
GetActiveReps
For i = 1 To TotalReps
   Do While Not GetActiveReps.EOF
      If MyRepArray(i) <> GetActiveReps.MoveNext Then
         blnRepMatch = False
      Else
         Exit Do
      End If
   Loop

GetActiveReps is the name of the stored procedure. Since Getactivereps is the name of the function, it is defined As a Recordset. All of this is done thru VBScript. I would expect, since GetActiveReps is defined as a Recordset that it would accept MoveNext, but it doesn't. Is this too confusing with the function name and the Recordset name being the same. Here is how GetActive Reps is defined:
         Private Function GetActiveReps() As ADODB.Recordset

If you see something I don't please let me know. Thanks, in advance, for your help.
                                                        Harry


Harry R. Egeth
Reply With Quote