It is an Oracle SDE database. Sorry I was not clear. I will try the code CarlesMacleod displayed below and see how it goes.
In our SDE database, we have many datasets. I want to be able to list the dataset names and allow user to select ONE dataset and loop through the feature layers in it.
Thank you all!