Contents tagged with Tip
-
Tip 12 : Common T-SQL Escape Scenarios: Percent (%), Underscore (_)
Scenario 1 : You have a Purchase table with field named DiscountRate. The DiscountRate values can be true percentage such as "2.5%", "5.0%", or can be other values such as "N/A", "Fixed Rate", etc. You want all the records with true percentage.
-
Tip 11 : Group By Date for DateTime Type Field
You have a Purchase table with fields of ID, PurchaseAmount and PurchaseDate. The PurchaseDate field is DateTime type that includes Date and Time information. You want daily total purchase amount.
-
Tip 10 : Returning the first part of a string with delimiter
You have a string delimited by underscore such as 1stPart_2ndPart_3rdPart and want to return the first part of the string only.
-
Tip 9 : Windows Authentication Is Missing in IIS 7.0
I deployed my silverlight 3.0 application to IIS 7.0 on Windows Server 2008 and could not find Windows Authentications. It is an intranet application and only corporate windows domain users are allowed to access the application, thus windows authentication needs be used.
-
Tip 8 : IsDate() function in C#
C# does not provide IsDate() function, but you can build one pretty easily:
-
Tip 7 : Invalid Directory? Use Cmd instead of Command
At your windows xp computer, click Start, point to and click Run. then type: command and click OK. Now you are in the command prompt screen.
-
Tip 6 : Function returning SqlDataReader Type
I am strongly against building a function that returns SqlDataReader type because it destroys the basic purpose of building a function: decoupling or separation of concerns. For SqlDataReader, an active database connection needs be kept open across your function to the client that calls the function.
-
Tip 5 : The name ‘ErrorMessageLabel’ does not exist in the current context
At Siverlight application test page, you add an ASP.NET label control:
-
Tip 4 : Microsoft Office Excel XML : Use the Correct DateTime Format to Avoid Error
The correct format for DateTime data type in an Excel XML cell is yyyy-MM-ddTHH:mm:ss.fff. Using other formats will give you an error of The file cannot be opened because of errors when you open the Excel xml file.
-
Tip 3 : Double Quotation Marks in String: Using C# Escape Sequence
You have the following sentence that has double quotation marks: