Location based services in mobile environments have been recognized as a challenging problem that calls for new service models and dynamic strategies. The problem becomes even harder when not only the clients but also the data sources can move. We tackle the problem by providing a general service architecture that facilitates the employment of mobile codes. We then device a concise but effective cost model for information services to instantaneous and continuous queries on both designated objects and location based range data. The cost analysis leads to a set of data management strategies that employs mobile codes with intelligent caching and proactive pushing to reduce service cost and improve response time. For each strategy, we present analytical characterization of the execution cost to pinpoint the exact situation for applying the strategy. Simulation results suggest that the use of mobile codes can be very effective in location based services to moving data sources.