Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 04:17 PM
Authorized User
 
Join Date: Mar 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Two Datareaders??

I need some direction

I have a huge Sql2k db and I need to get information from several tables. I created the stored proc's to get the info I need.
I have a datareader that runs the Sp with a Parameter
 I then need to call another sp_w/parameter while looping through the first reader.
ex:
dr=cmd.ExecuteReader
while dr.read()
      PatientID= dr.getstring(0)
      Patient(PatientID)
next

Private Sub Patient(byVal PatientID)
execute another reader
while dr.read()
     do some stuff
next
end sub
------

What is the Best way to do this, two Datareaders just wont work in the same connection.








Similar Threads
Thread Thread Starter Forum Replies Last Post
DataReaders Open Problem gaurav_jain2403 ADO.NET 3 July 10th, 2006 05:38 AM
2 DataReaders Open Problem gaurav_jain2403 ASP.NET 1.0 and 1.1 Professional 1 July 2nd, 2006 10:05 PM
Multiple Datareaders using the same connection malarvizhi C# 0 June 20th, 2006 06:28 AM
executing 2 datareaders msrnivas .NET Web Services 2 January 8th, 2004 08:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.