Re: How to retrieve a returned SQL function value?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Italo Silveira (No_at_Spam.com)
Date: 02/11/05


Date: Fri, 11 Feb 2005 17:10:51 -0500

You can use SqlCommand to execute a T-SQL to return the value.

Example:

    SELECT ColName = dbo.Function(Arg)

"Andrew" <Andrew@discussions.microsoft.com> wrote in message
news:DDCCBE1B-6FFA-4C37-BD0F-94D90D210B23@microsoft.com...
> Hello, friends,
>
> There is a function in SQL Server 2000, which return a number. How can I
> retrieve this value in my C#.net app using ADO.net? Any sample source
> code?
>
> Thanks a lot.



Relevant Pages

  • Help: TSQL loop or array
    ... I want to make samething like this in TSQL (SQL server 2000) ... foreach (colname as cname) ... EXECUTE sp_executesql @SQL ... I heard T-SQL doesn'n have array, so how to workaround this problem ...
    (microsoft.public.sqlserver.programming)
  • Re: Execute SSIS Package
    ... There is no native T-SQL command to execute a package, ... I don't think executing packages from T-SQL is the best idea. ... > in SQL Server 2005 without having to go to xp_cmdshell and run DTExec? ...
    (microsoft.public.sqlserver.dts)
  • Re: Execute Persmission denied on object sp_OACreate
    ... > SQL Server is creating a job behind the scenes. ... > permissions. ... > SA account password and gaining access to the database. ... >>> How can get a user permissions to execute these stored procedures ...
    (microsoft.public.sqlserver.security)
  • Re: Update or Delete querys with Joins
    ... This is were I was missing the boat Steve. ... update multiple columns in the ANSI with the same right-side of query. ... that time as Microsoft deems it suitable for inclusion into T-SQL. ... > but SQL Server doesn't implement it. ...
    (microsoft.public.sqlserver.programming)
  • RE: exec sp_help_job user account rights
    ... wrapper in which u can call original stored procedure sp_help_job using “WITH ... EXECUTE AS “ clause and then give execute permission of external stored ... Database Administrator, SQL Server 2005 ... the sysadmin fixed role can use sp_help_job to view only the jobs he/she owns. ...
    (microsoft.public.sqlserver.security)