Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop in batches

Status
Not open for further replies.

HezMac

Programmer
Jan 14, 2004
56
CA
Hi

I would like to send a string of numbers to a PL/SQL procedure from VB6.

The string of numbers represents unique IDs concatenated together. The string can only be 2000 characters, approximately the unique IDs of 200 records.

If the string is 3000, I'd like to send the first 2000 along, run the procedure, come back to VB and send back the next 1000.

Any idea on how the 'come back to VB and process the next 1000 characters' will work?

Here is where I plan on working this code in:

Code:
'Count the number of rows selected
    rowCount = gridPending.Selected.Rows.Count
    Debug.Print "# rows selected: " & rowCount
        
        For Each cellCount In gridPending.Selected.Rows
            
            Set aRow = gridPending.Selected.Rows.Item(i)
            FolderRSN = aRow.Cells(5).Value
            RemoveFolders = RemoveFolders + FolderRSN + ","
                           
            'get the associated batch number
            Set bRow = gridPending.Selected.Rows.Item(i)
            Batch = bRow.Cells(6).Value
            BatchNumber = BatchNumber + Batch + ","
            
            i = i + 1
         
        Next            
  
    'If count is 200, Call Remove function
    If i = 200 Then
        Call Remove_Reassign(RemoveFolders, BatchNumber)
    End If

Thanks.
 
How about testing if the row has been selected within your loop?

Everybody body is somebodys Nutter.
 
I'm not sure what you mean. Test if the row is selected? What will that do?

Thanks.
 
Very sorry, it seems I had the wrong end of the stick.


Everybody body is somebodys Nutter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top