Probably, many of you know this trick, but I thought it might be useful to people who doesn't know it. This script, when run in query analyzer with text output selected, simply creates property methods code. This example is written for creating property methods for c#. But you can modify it for any language. The only benefit of this script is that it saves a lot of time, when you have to write property methods for a class that has too many properties (fields). You have to add cases for all the data types that your table uses.
2007-10-02 (first published: 2002-06-20)
15,449 reads