Saturday, 17 August 2013

Yet not grasping "output variables" concept both on T-SQL and C#

Yet not grasping "output variables" concept both on T-SQL and C#

What's the deal with output parameters in T-SQL/Sql Server Manager and
C#?? How the 2 combines when used with assemblies and so on?
Well I see that people puts in T-SQL stored procedures output parameters...
What's the sense of this? It seems so simple yet they managed to make it
dull and complicated.
I.E:
I made a stored procedure with a select and output parameters.
What's the big deal? I execute it and see the result anyway.
What's the deal with assemblies or with calling it from C# code? I execute
it and I can still manage to save all the content within datatables or
stream readers without the need of output parameters....
Any good explanations??
Same goed for C#
What out parameter modified does?
I.E: a function like this FindCity(string zipcode, out string cityname)
From what I've understood, it's just that I can assing cityname without
even declaring it and it will come out as a string (at least I think)
What the??? Why is that? Can anyone enlighten me?
Thanks

No comments:

Post a Comment