Sunday, 29 April 2012

Dynamic SQL query when number of fields in where clause in not known

suppose we have a front end where user can select different filters to narrow down the query results.In this case it is not already known which all fields user will select.
A dynamic query for this case can be constructed using this trick:

here fieldNames is the array containing names of all filters and fields is the array containing values provided by user.

Saturday, 28 April 2012 Eclipse plugin installation problem

Installation fails with error 'Md5 hash not as expected'
original error message :

An error occurred while collecting items to be installed session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Problems downloading artifact: osgi.bundle,com.salesforce.ide.api, MD5 hash is not as expected. Expected: 97a6329f82c422a61e9b1bc28be7cace and found ef8b1c2b63c7d04acaa6bf41f4b8570c.

this happens due to corrupted download of jars by eclipse.To fix the problem follow these steps:
1. download all jars manually from and
   you can use firefox plugin 'download them all' to download all links in one click.
2. put them in /features/ and /plugins/ directory of eclipse plugin installation again as you would do normally.It won't download the jars again and it will work without error.

original post: