469,641 Members | 1,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

Retrieving single record using output parameters

Hi All.

I'm working for a company that has set out a guideline for retrieving
data from a database. Nobody can explain to me the reason for the

When retrieving a set of records from database to a VB.net app, they
retrieve the database fields as a record set

eg. "select name, suburb from myTable"
and then populate properties of the object collection.
When retrieving a single record for a single object they use output
parameters to return the values

eg. "select @name = name, @suburb = suburb from mytable where criteria
= @inputParam"

The code i've used is simple enough but when there are about 20 values
to retieve from a single record, the resutling VB and SQL code gets
downright verbose.

Can anyone tell me what if any advantages there are in retrieving the
values as output parameters?

If my query successfully returns only one record, I can't see why I
can't just return the data field values.

Sorry if I haven't describe this well.

Mar 16 '06 #1
0 1768

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Zach Corera | last post: by
4 posts views Thread by Mark Olbert | last post: by
5 posts views Thread by Sanjay Pais | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.