Using (nolock) with SQL Select Query in SQL Server 2005

I was using following query select top 10 * from [sqlserver02\sqlserver02].mydatabase.dbo.aspnet_membership (nolock) whereas “sqlserver02″ was a remote serever  and I found following errro Msg 4122, Level 16, State 1, Line 1 Remote table-valued function calls are not allowed. Then I remove (nolock) from the query and it worked. Does any one know why remote serever [...]

Remove extra spaces from string using regular expression, asp.net, c#

Removes extra space from the string using Regular expression. public static readonly RegexOptions Options =          RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline; public string RemoveExtaSpaces(string text) { Regex regex = new Regex(@”\s{2,}”, Options); text = regex.Replace(text.Trim(), ” “); //This line removes extra spaces and make space exactly one. //To remove the  space between the end of a word [...]