Re: making datareaders
- From: "Chris Dunaway" <dunawayc@xxxxxxxxx>
- Date: 3 May 2006 11:01:43 -0700
Here's an example of what we do.
We execute the sql query to get a datareader back then pass that
datareader into a method to fill and object (or it could be an array)
and return that object:
Private Function FillUserObect(rdr As SqlDataReader) As User
Dim u As New User()
u.Id = rdr.GetInt32("Id")
u.Name = rdr.GetString("Name")
'More lines for the rest of the fields here
Return u
End Function
You can also use the data reader's GetValues method to fill an object
array with the values.
.
- Follow-Ups:
- Re: making datareaders
- From: aaron.kempf@xxxxxxxxx
- Re: making datareaders
- References:
- making datareaders
- From: dbahooker
- Re: making datareaders
- From: Chris Dunaway
- Re: making datareaders
- From: aaron.kempf@xxxxxxxxx
- Re: making datareaders
- From: Chris Dunaway
- Re: making datareaders
- From: aaron.kempf@xxxxxxxxx
- Re: making datareaders
- From: Chris Dunaway
- Re: making datareaders
- From: aaron.kempf@xxxxxxxxx
- making datareaders
- Prev by Date: Re: System.Configuration.ConfigurationSettings.AppSettings.Get("...")
- Next by Date: Re: Ho do I create a program that can get recognized as a printer driver and installed with the add printer commandes.
- Previous by thread: Re: making datareaders
- Next by thread: Re: making datareaders
- Index(es):
Relevant Pages
|