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

Mark Breen marklbreen at gmail.com
Fri Nov 27 08:33:52 CST 2009


Hello Gustav,

I presume they are not costly in terms of resources, and in fact, I would
not dream of re-using a param for two different purposes.

I think my delight was just that I never know you could share directions.

I can imagine that Mr Colby will find a use for a standard piece of his
arsenal to have a in-out param and once he does, he will wonder how we ever
existing without utilising that aspect of params.

Perhaps lastupdated as a field would be an appropriate use, where the last
updated value is passed in to the sproc, and then passed back again with the
new value after an update has been made, after checking for concurrency
errors first.

Thanks

Mark







2009/11/27 Gustav Brock <Gustav at cactus.dk>

> 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
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>



More information about the dba-VB mailing list