I have a stored procedure that runs 4 separate select statements. From there, in VB.NET, I use a datareader to get each of the 4 sets of records. With each set of records I populate an EXCEL file, one worksheet for each set of records
To get the first set of records from the stored procedure, I use
Get all of the data from first Select
I then use
Get all of the data from subsequent Selects
to get the 2nd, 3rd, and 4th set of records.
My code will hang when, for example, the 3rd set of records has or returns no records. It takes the VB code a very long time to get past the empty 3rd record set, if at all, and never gets to the next and final 4th record set
Any suggestions on how I can get the code to move past any of these when one, or more of the Select statements return no records?