Hi there,
We are developing a hibernate(2.1.X) based application.We got a message from our DBA to use bind variables, not literals.What exactly that means.Here is my code ..What exactly i should do to use bind variables?
try {
Session session = HibernateSessionFactory.currentSession();
StringBuffer sql = new StringBuffer();
sql.append("from CswCaseParent1 as cp where (cp.clientSsnId = '").append(ssn)
.append("' AND
cp.clientPinId = '").append(pin)
.append("') OR (cp.respondentSsnId = '").append(ssn)
.append("' AND cp.respondentPinId ='").append(pin).append("')");
Query q1 = session.createQuery
(sql.toString());
result = q1.list();
}
Any help is much appreciated.--
Thanks & Regards
Srinivas
732-648-9421(Cell)