Iterating through Enums

Here is how you iterate through a set of Enum items:

For Each thisItem As Integer In System.Enum.GetValues(GetType(ENumName))
‘Do processing here
Next

System.Enum.GetNames is also available

References:

http://msdn.microsoft.com/en-us/library/58hssdz9%28VS.80%29.aspx

Finding the Length of an Image Field in SQL Server

Problem: I need to know the size in bytes of an image stored in an Image field in SQL Server

Solution: SELECT DATALENGTH(column) FROM table

DateTime.ToString()

Here is a link that is useful as a reference for DateTime.ToString patterns

References:

http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm