[dba-VB] Parameter objects in C# and ADO.

Gustav Brock Gustav at cactus.dk
Fri Nov 27 04:44:46 CST 2009


Hi Mark et al

What's the big deal? Are parameters costly? Hardly in money, but in resources?

/gustav


>>> marklbreen at gmail.com 27-11-2009 11:00 >>>
Hello John,

that Shamil has said is that you can use one param to pass in a value, and
use the same param to accept back a value, which may be different to when it
was passes in.

You can pass in ProductId, and get back, ProductCode,
or pass in username and get back fullname,

or pass in product code and get back zero if the product code does not
exist, else you get back the code you passed in
or pass in productid and get back qty in stock,

all with one param.

My examples are not great, but there are plenty of times where you need to
somehow inspect a value and it may not be ideal to have two params named
paramOriginal
paramNewValue

with inputout you can have just one param named paramToBeVerified

Thanks again to Shamil, Stuart and Mr Colby for asking the question.

Mark





More information about the dba-VB mailing list