I'm using DataSet to connect my C# program with SQL database. I want one of the columns to be an enumeration and I want it to act as an enum in my code. How can I do this?
I don't think you can. SQL Server doesn't have a concept of enums.
I would suggest using an ApplicationService layer that sits atop your repository layer. Then in your ApplicationService class (think of appropriate name for this class) you can transform the data that is returned from the repository layer to the appropriate enum value in your POCO object.
Technically you can't. Enum's are static typed, they are designed to be used when you know all of the values at compile time. While there are some work-arounds, I would highly recommend that you do not do this.
Look at a unmodifiable dataset, this will give most of the benefits of a Enum and can be created on the fly.
While data cannot be stored as an Enum, they can be used as a fancy filter as long as the data in the database column is of an integer type. That is a complete different question if that is what you are after. Go to the MSDN page and read up on Enum's.
I don't mean to burst everyone's bubble, but you can easily map an integer to an Enum using a Strongly Typed DataSet. I do it all the time. Rather than type the whole thing out here I have created an entry on my Blog describing in detail how to accomplish this.