This is my problem: I do not know how to get the servername from a C# user defined function . Is this possible
I am writing a User Defined Function (UDF). Inside of this user defined function I need the name of the databaseserver that it is running on. Does anyone have an idea how I might do this Is there an enviromental variable that I could access within the C# code I use to write the UDF
I could always use a parameter to pass in the name of the server, but I would like to have as few parameters as possible.
Thanks in advance,
Sean

C# user defined function: Is there a way to access the name of the sql server?
StefanH07
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--
Solanice
SqlConnection conn = new SqlConnection("context connection=true");
conn.Open();
// conn.Database --> hold the string of the database name
conn.Close();
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---