Great!!! Thanks for the examples. My layer is runing perfectly!!!!! But the error was i have a classitem in the layer definition within .map file. This classitem reference a field that was not in the select list. Thanks again, Oscar