use store procedure instead of querying sql. use codelite ide instead of eclipse