Hi Nicholas,
At least from the Query Analizer you need to prefixe the function with the
owner of it.
I have never called a function from a .NET app. but I would try it like
this if not work then prefixed completly beggining with the DB name like:
dbname.dbo.functionName
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eb****************@TK2MSFTNGP12.phx.gbl...
Andy,
You can call a function just like a stored procedure. However, I
believe that for the name, you can not use just the function name, but
rather, you have to use the function name prefixed by the database name.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Andy Li" <ji*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... I know how to call a stored procedure in SQL server from C# using
SQLCommand class. Could someone tell me how to call a SQL function in SQL sever
from C#?
Thanks,
Andy