Replace XElement with xml in string (C#)

0 Comments

If you want to replace an existing XElement by an new XElement conctructed from a string, you can use the XElement ReplaceWith method: XElement element = new XElement("MyName", "MyContent"); string newValue = "<MyNewName>Some value</MyNewName>"; element.ReplaceWith(XElement.Parse(newValue));

Exception on Microsoft SQL Server Reporting Services PrepareQuery

0 Comments

If you get the exception: {"System.Web.Services.Protocols.SoapException: Cannot create a connection to data source ”. —> Microsoft.ReportingServices.Diagnostics.Utilities.DataSourceOpenException: Cannot create a connection to data source ”. —> Microsoft.ReportingServices.DataExtensions.ReportServerDataProvider.RSDPException: You have specified integrated security or credentials in the

Lowercase first letter of a string in C# (C sharp)

0 Comments

If you want to lowercase the first letter of a string in C# use: /// <summary> /// Lowercase first word in string /// </summary> /// <param name="s"></param> /// <returns></returns> public string LowercaseFirst(string s) { if

Uppercase first letter of a string in C# (C sharp)

0 Comments

To uppercase the first letter of a string in C#, use: /// <summary> /// Capatilize first word in string /// </summary> /// <param name="s"></param> /// <returns></returns> public string UppercaseFirst(string s) { if (string.IsNullOrEmpty(s)) { return

Get first day of current week or last week with TSQL

0 Comments

To get the first day of the current week use: select dateadd(dd, (datepart(dw, getdate()) * -1) + 2, getdate()) To get the first day of previous week and last day of previous week use: select

Microsoft Outlook 2007 Search

0 Comments

General · Search is not case-sensitive. · Search for “All Mail Items”, includes all outlook files and includes folders like Inbox, Outbox, Sent Items and Conversation History If you want to search for a Text