Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 MyDocuments location

Author  Topic 

harlingtonthewizard
Constraint Violating Yak Guru

352 Posts

Posted - 2009-03-23 : 23:14:07
Looking for a way in SQL2005 to get the location of MyDocuments. I need to save information in this location. In C# can use getenvironmentvariables.

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-03-24 : 07:35:18
You can use a CLR stored procedure. This link has a walk-through example which outlines the basic steps: http://geekswithblogs.net/frankw/archive/2008/05/03/a-quick-walk-through-of-clr-integration-with-sql-server.aspx
You will need to enable SQL CLR in surface area configuration if not already enabled.
Go to Top of Page
   

- Advertisement -